MyWpfExtension.cs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. using System;
  2. using System.Collections;
  3. using System.ComponentModel;
  4. using System.Runtime.CompilerServices;
  5. using System.Windows;
  6. using Microsoft.VisualBasic;
  7. using Microsoft.VisualBasic.ApplicationServices;
  8. using Microsoft.VisualBasic.CompilerServices;
  9. using Microsoft.VisualBasic.Devices;
  10. using Microsoft.VisualBasic.Logging;
  11. namespace PCL.My
  12. {
  13. // Token: 0x02000012 RID: 18
  14. [HideModuleName]
  15. [StandardModule]
  16. internal sealed class MyWpfExtension
  17. {
  18. // Token: 0x0600004D RID: 77 RVA: 0x00002447 File Offset: 0x00000647
  19. internal static Application RunParser()
  20. {
  21. return (Application)Application.Current;
  22. }
  23. // Token: 0x0600004E RID: 78 RVA: 0x00002453 File Offset: 0x00000653
  24. internal static Computer ManageParser()
  25. {
  26. return MyWpfExtension._Parser.StopTests();
  27. }
  28. // Token: 0x0600004F RID: 79 RVA: 0x0000245F File Offset: 0x0000065F
  29. internal static User AwakeParser()
  30. {
  31. return MyWpfExtension._Broadcaster.StopTests();
  32. }
  33. // Token: 0x06000050 RID: 80 RVA: 0x0000246B File Offset: 0x0000066B
  34. internal static Log WriteParser()
  35. {
  36. return MyWpfExtension.reader.StopTests();
  37. }
  38. // Token: 0x06000051 RID: 81 RVA: 0x00002477 File Offset: 0x00000677
  39. internal static MyWpfExtension.MyWindows ComputeParser()
  40. {
  41. return MyWpfExtension.m_Field.StopTests();
  42. }
  43. // Token: 0x04000002 RID: 2
  44. private static MyProject.ThreadSafeObjectProvider<Computer> _Parser = new MyProject.ThreadSafeObjectProvider<Computer>();
  45. // Token: 0x04000003 RID: 3
  46. private static MyProject.ThreadSafeObjectProvider<User> _Broadcaster = new MyProject.ThreadSafeObjectProvider<User>();
  47. // Token: 0x04000004 RID: 4
  48. private static MyProject.ThreadSafeObjectProvider<MyWpfExtension.MyWindows> m_Field = new MyProject.ThreadSafeObjectProvider<MyWpfExtension.MyWindows>();
  49. // Token: 0x04000005 RID: 5
  50. private static MyProject.ThreadSafeObjectProvider<Log> reader = new MyProject.ThreadSafeObjectProvider<Log>();
  51. // Token: 0x02000013 RID: 19
  52. [EditorBrowsable(EditorBrowsableState.Never)]
  53. [MyGroupCollection("System.Windows.Window", "Create__Instance__", "Dispose__Instance__", "My.MyWpfExtenstionModule.Windows")]
  54. internal sealed class MyWindows
  55. {
  56. // Token: 0x06000052 RID: 82 RVA: 0x0000E39C File Offset: 0x0000C59C
  57. private static T Create__Instance__<T>(T Instance) where T : Window, new()
  58. {
  59. T result;
  60. if (Instance == null)
  61. {
  62. if (MyWpfExtension.MyWindows.factoryRepository != null)
  63. {
  64. if (MyWpfExtension.MyWindows.factoryRepository.ContainsKey(typeof(!!0)))
  65. {
  66. throw new InvalidOperationException("The window cannot be accessed via My.Windows from the Window constructor.");
  67. }
  68. }
  69. else
  70. {
  71. MyWpfExtension.MyWindows.factoryRepository = new Hashtable();
  72. }
  73. MyWpfExtension.MyWindows.factoryRepository.Add(typeof(!!0), null);
  74. result = Activator.CreateInstance<T>();
  75. }
  76. else
  77. {
  78. result = Instance;
  79. }
  80. return result;
  81. }
  82. // Token: 0x06000053 RID: 83 RVA: 0x00002483 File Offset: 0x00000683
  83. private void Dispose__Instance__<T>(ref T instance) where T : Window
  84. {
  85. instance = default(!!0);
  86. }
  87. // Token: 0x06000054 RID: 84 RVA: 0x00002411 File Offset: 0x00000611
  88. [EditorBrowsable(EditorBrowsableState.Never)]
  89. public MyWindows()
  90. {
  91. }
  92. // Token: 0x06000055 RID: 85 RVA: 0x0000248C File Offset: 0x0000068C
  93. [EditorBrowsable(EditorBrowsableState.Never)]
  94. public override bool Equals(object o)
  95. {
  96. return base.Equals(RuntimeHelpers.GetObjectValue(o));
  97. }
  98. // Token: 0x06000056 RID: 86 RVA: 0x0000249A File Offset: 0x0000069A
  99. [EditorBrowsable(EditorBrowsableState.Never)]
  100. public override int GetHashCode()
  101. {
  102. return base.GetHashCode();
  103. }
  104. // Token: 0x06000057 RID: 87 RVA: 0x000024A2 File Offset: 0x000006A2
  105. [EditorBrowsable(EditorBrowsableState.Never)]
  106. internal new Type GetType()
  107. {
  108. return typeof(MyWpfExtension.MyWindows);
  109. }
  110. // Token: 0x06000058 RID: 88 RVA: 0x000024AF File Offset: 0x000006AF
  111. [EditorBrowsable(EditorBrowsableState.Never)]
  112. public override string ToString()
  113. {
  114. return base.ToString();
  115. }
  116. // Token: 0x06000059 RID: 89 RVA: 0x000024B7 File Offset: 0x000006B7
  117. public FormMain DisableTests()
  118. {
  119. this._ExporterRepository = MyWpfExtension.MyWindows.Create__Instance__<FormMain>(this._ExporterRepository);
  120. return this._ExporterRepository;
  121. }
  122. // Token: 0x0600005A RID: 90 RVA: 0x000024D0 File Offset: 0x000006D0
  123. public void InitTests(FormMain Value)
  124. {
  125. if (Value != this._ExporterRepository)
  126. {
  127. if (Value != null)
  128. {
  129. throw new ArgumentException("Property can only be set to Nothing");
  130. }
  131. this.Dispose__Instance__<FormMain>(ref this._ExporterRepository);
  132. }
  133. }
  134. // Token: 0x04000006 RID: 6
  135. [ThreadStatic]
  136. private static Hashtable factoryRepository;
  137. // Token: 0x04000007 RID: 7
  138. [EditorBrowsable(EditorBrowsableState.Never)]
  139. public FormMain _ExporterRepository;
  140. }
  141. }
  142. }