예제 #1
0
        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);
        }
예제 #2
0
파일: Loader.cs 프로젝트: tomasdeml/hyphen
        /// <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);
        }
예제 #3
0
 internal static void InitializeCurrent(MirandaPluginLink mirandaLink, PluginManagerBase pluginManager)
 {
     InitializeCurrent(mirandaLink, pluginManager, false);
 }
예제 #4
0
 /// <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);
 }
예제 #5
0
 internal static void InitializeCurrent(MirandaPluginLink mirandaLink, PluginManagerBase pluginManager, bool skipContextPopulation)
 {
     if (singleton == null)
         singleton = new MirandaContext(pluginManager, mirandaLink, skipContextPopulation);
 }