コード例 #1
0
ファイル: FusionContext.cs プロジェクト: tomasdeml/hyphen
        internal FusionContext(Loader loader, AssemblyProbe pluginProbe, IntPtr nativePluginLink)
        {
            if (loader == null)
                throw new ArgumentNullException("loader");

            if (pluginProbe == null)
                throw new ArgumentNullException("pluginProbe");

            if (nativePluginLink == IntPtr.Zero) 
                throw new ArgumentNullException("nativePluginLink");

            this.loader = loader;
            this.assemblyProbe = pluginProbe;
            this.nativePluginLink = nativePluginLink;
        }
コード例 #2
0
ファイル: PluginSandbox.cs プロジェクト: tomasdeml/hyphen
        public void LoadAssemblyProbe()
        {
            AssemblyProbe customProbe = null;

            try
            {
                string fusionAssemblyName = RuntimeConfiguration.Singleton.CustomFusionAssemblyName;
                string assemblyProbeTypeName = RuntimeConfiguration.Singleton.CustomAssemblyProbeTypeName;

                if (!String.IsNullOrEmpty(fusionAssemblyName) && !String.IsNullOrEmpty(assemblyProbeTypeName))
                    customProbe = InstantiateRemoteObject<AssemblyProbe>(fusionAssemblyName, assemblyProbeTypeName, null);
            }
            catch (Exception e)
            {
                Log.DebuggerWrite(0, Loader.LogCategory, "Unable to load custom assembly probe (" + e.Message + "), defaulting to the built-in one.");
            }

            assemblyProbe = customProbe ?? InstantiateRemoteObject<AssemblyProbe>(GetType().Assembly.FullName, typeof(DefaultAssemblyProbe).FullName);
        }