private MirandaContext(PluginManagerBase pluginManager, MirandaPluginLink mirandaLink, bool skipContextInfo) { if (mirandaLink == null) throw new ArgumentNullException("mirandaLink"); this.pluginManager = pluginManager; this.mirandaDatabase = new MirandaDatabase(); this.pluginLink = mirandaLink; this.contactList = new ContactList(); this.serviceInterceptors = new ServiceCallInterceptionManager(); GetMMInterface(); PopulateEnvironmentInformation(); if (!skipContextInfo) PopulateContextInformation(); else this.protocols = new ProtocolDictionary(0); }
/// <summary> /// Initializes the runtime context (including configuration). /// </summary> /// <param name="pPluginLink">Ptr to PLUGINLINK to initialize from.</param> private void InitializeRuntimeContext(IntPtr pPluginLink) { // Init configuration RuntimeConfiguration.Initialize(); // Marshal the plugin link PluginLink = MirandaPluginLink.FromPointer(pPluginLink); // Initialize temporary context (specific to default AppDomain) for standalone modules MirandaContext.InitializeCurrent(PluginLink, true); }
internal static void InitializeCurrent(MirandaPluginLink mirandaLink, PluginManagerBase pluginManager) { InitializeCurrent(mirandaLink, pluginManager, false); }
/// <summary> /// Initializes a context from a plugin link. /// </summary> /// <param name="mirandaLink"></param> /// <param name="skipContextPopulation"></param> internal static void InitializeCurrent(MirandaPluginLink mirandaLink, bool skipContextPopulation) { InitializeCurrent(mirandaLink, null, skipContextPopulation); }
internal static void InitializeCurrent(MirandaPluginLink mirandaLink, PluginManagerBase pluginManager, bool skipContextPopulation) { if (singleton == null) singleton = new MirandaContext(pluginManager, mirandaLink, skipContextPopulation); }