示例#1
0
            internal override void LoadExternalDependencies(
                Assembly loadedAssembly,
                IReadOnlyList <AssemblyDependency> externalDependencies)
            {
                if (externalDependencies == null)
                {
                    return;
                }

                foreach (var externalDep in externalDependencies)
                {
                    try {
                        Log.Debug(TAG, $"Loading external dependency from {externalDep.Location}…");
                        if (MacIntegration.IsMac)
                        {
                            // Don't do anything for now on Mac, nothing we've tried
                            // so far works. :(
                        }
                        else
                        {
                            WindowsSupport.LoadLibrary(externalDep.Location);
                        }
                    } catch (Exception e) {
                        Log.Error(TAG, "Could not load external dependency.", e);
                    }
                }
            }
示例#2
0
            internal override void LoadExternalDependencies(
                Assembly loadedAssembly,
                IReadOnlyList <AssemblyDependency> externalDependencies)
            {
                if (externalDependencies == null)
                {
                    return;
                }

                // On Mono platforms, we can't do anything until we've loaded the assembly, because we need
                // to insert things specifically into its DllMap.
                if (MacIntegration.IsMac && loadedAssembly == null)
                {
                    return;
                }

                foreach (var externalDep in externalDependencies)
                {
                    try {
                        Log.Debug(TAG, $"Loading external dependency from {externalDep.Location}.");
                        if (MacIntegration.IsMac)
                        {
                            MonoSupport.AddDllMapEntries(loadedAssembly, externalDep);
                        }
                        else
                        {
                            WindowsSupport.LoadLibrary(externalDep.Location);
                        }
                    } catch (Exception e) {
                        Log.Error(TAG, "Could not load external dependency.", e);
                    }
                }
            }
示例#3
0
        public override void LoadExternalDependencies(
            Assembly loadedAssembly,
            AssemblyDependency [] externalDependencies)
        {
            if (externalDependencies == null)
            {
                return;
            }

            foreach (var externalDep in externalDependencies)
            {
                try {
                    Log.Debug(TAG, $"Loading external dependency from {externalDep.Location}…");
                    WindowsSupport.LoadLibrary(externalDep.Location);
                } catch (Exception e) {
                    Log.Error(TAG, "Could not load external dependency.", e);
                }
            }
        }