Changeset 2370
- Timestamp:
- 11/07/11 12:04:58 (19 months ago)
- Location:
- branches/eraser6/pluginsRewrite/Eraser.Plugins
- Files:
-
- 2 edited
-
Host.cs (modified) (5 diffs)
-
PluginInfo.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/pluginsRewrite/Eraser.Plugins/Host.cs
r2358 r2370 68 68 /// initialisation is complete. 69 69 /// </summary> 70 /// <param name="store">The root persistent store for all plugins.</param> 70 71 /// <remarks>Call <see cref="Host.Instance.Dispose"/> when exiting.</remarks> 71 public static void Initialise( )72 { 73 new DefaultHost( );72 public static void Initialise(PersistentStore store) 73 { 74 new DefaultHost(store); 74 75 } 75 76 … … 77 78 /// Constructor. Sets the global Plugin Host instance. 78 79 /// </summary> 80 /// <param name="store">The root persistent store for all plugins.</param> 79 81 /// <see cref="Host.Instance"/> 80 protected Host( )82 protected Host(PersistentStore store) 81 83 { 82 84 if (Instance != null) … … 84 86 "exist at any one point of time."); 85 87 Instance = this; 88 PersistentStore = store; 86 89 87 90 EntropySources = new EntropySourceRegistrar(); … … 96 99 /// </summary> 97 100 public static Host Instance 101 { 102 get; 103 private set; 104 } 105 106 /// <summary> 107 /// The root persistent store for all plugins. 108 /// </summary> 109 public PersistentStore PersistentStore 98 110 { 99 111 get; … … 218 230 /// Constructor. 219 231 /// </summary> 220 public DefaultHost( )221 : base( )232 public DefaultHost(PersistentStore store) 233 : base(store) 222 234 { 223 235 //Specify additional places to load assemblies from -
branches/eraser6/pluginsRewrite/Eraser.Plugins/PluginInfo.cs
r2369 r2370 59 59 AssemblyAuthenticode = cert; 60 60 } 61 62 //Get the persistent store for this assembly 63 PersistentStore = Host.PersistentStore.GetSettings<PersistentStore>( 64 new Guid(((GuidAttribute)Assembly.GetCallingAssembly(). 65 GetCustomAttributes(typeof(GuidAttribute), false)[0]).Value).ToString()); 61 66 } 62 67
Note: See TracChangeset
for help on using the changeset viewer.
