コード例 #1
0
ファイル: GACManagerModel.cs プロジェクト: VE-2016/VE-2016
        /// <summary>
        /// Enumerates assemblies from the global assembly cache.
        /// </summary>
        /// <param name="onAssemblyEnumerated">Action to call when each assembly is enumerated.</param>
        /// <returns>
        /// The time taken to enumerate all assemblies.
        /// </returns>
        public TimeSpan EnumerateAssemblies(Action <AssemblyDescription> onAssemblyEnumerated)
        {
            //  Start a stopwatch.
            var stopwatch = new Stopwatch();

            stopwatch.Start();

            //  Create an assembly cache enumerator.
            var assemblyCacheEnum = new AssemblyCacheEnumerator(null);

            //  Enumerate the assemblies.
            var assemblyName = assemblyCacheEnum.GetNextAssembly();

            while (assemblyName != null)
            {
                //  Create the assembly description.
                var desc = new AssemblyDescription(assemblyName);

                //  Create an assembly view model.
                onAssemblyEnumerated(desc);
                assemblyName = assemblyCacheEnum.GetNextAssembly();
            }

            //  Stop the stopwatch.
            stopwatch.Stop();

            //  Return the elapsed time.
            return(stopwatch.Elapsed);
        }
コード例 #2
0
        private static void GetSubKeys(RegistryKey SubKey, string b, string name)
        {
            foreach (string sub in SubKey.GetSubKeyNames())
            {
                // MessageBox.Show(sub);
                // RegistryKey local = Registry.Users;
                RegistryKey local = SubKey.OpenSubKey(sub);
                if (local.GetValue(null) != null)
                {
                    var v = local.GetValue(null);

                    if (sub.ToString() == b)
                    {
                        AssemblyDescription asd = null;

                        string c = local.Name.ToString();

                        //RegistryKey r = local.OpenSubKey(local.GetValue(null).ToString());

                        //if(v.ToString().EndsWith(".dll") == true)

                        asd = new GACManagerApi.AssemblyDescription(v.ToString(), "", true);

                        asd.Name = name;

                        C.Add(asd);
                    }
                }
                GetSubKeys(local, b, name); // By recalling itself it makes sure it get all the subkey names
            }
        }
コード例 #3
0
        static async public Task <ArrayList> EnumerateAssemblies()
        {
            ArrayList L = new ArrayList();

            //  Start a stopwatch.
            //var stopwatch = new Stopwatch();
            //stopwatch.Start();

            //  Create an assembly cache enumerator.
            var assemblyCacheEnum = new AssemblyCacheEnumerator(null);

            //  Enumerate the assemblies.
            var assemblyName = assemblyCacheEnum.GetNextAssembly();

            while (assemblyName != null)
            {
                //  Create the assembly description.
                var desc = new AssemblyDescription(assemblyName);

                //  Create an assembly view model.
                //onAssemblyEnumerated(desc);
                assemblyName = assemblyCacheEnum.GetNextAssembly();

                L.Add(desc);
            }

            //  Stop the stopwatch.
            //stopwatch.Stop();

            //  Return the elapsed time.
            //return stopwatch.Elapsed;

            return(L);
        }
コード例 #4
0
        public void ReflectionProperties()
        {
            //  Get the first assembly in the global assembly cache.
            var someAssembly = new AssemblyDescription(new AssemblyCacheEnumerator().GetNextAssembly());

            //  Show the Runtime Version.
            System.Diagnostics.Trace.WriteLine(someAssembly.ReflectionProperties.RuntimeVersion);
        }
コード例 #5
0
        static List <IFileListing> GetDllListing(IFileListing src)
        {
            var completeList     = new List <IFileListing>();
            var fileSystemParent = new DllListing {
                Name = "File System", IsDirectory = true
            };
            var gacItem = new DllListing {
                Name = "GAC", IsDirectory = true
            };

            if (src == null)
            {
                var drives = DriveInfo.GetDrives().Where(info => info.DriveType != DriveType.CDRom && info.DriveType != DriveType.Removable);
                try
                {
                    var listing = drives.Select(BuildDllListing);
                    fileSystemParent.Children = listing.ToList();
                }
                catch (Exception e)
                {
                    Dev2Logger.Error(e.Message, GlobalConstants.WarewolfError);
                }
                var enumAssembly = new AssemblyCacheEnumerator();
                var assemblyName = enumAssembly.GetNextAssembly();
                var gacList      = new List <IFileListing>();
                while (assemblyName != null)
                {
                    //  Create the assembly description.

                    try
                    {
                        var displayName = new AssemblyDescription(assemblyName).DisplayName;
                        var name        = GlobalConstants.GACPrefix + displayName;
                        gacList.Add(new DllListing {
                            Name = displayName, FullName = name, IsDirectory = false
                        });
                    }
                    catch (Exception e)
                    {
                        Dev2Logger.Error(e.Message, GlobalConstants.WarewolfError);
                    }
                    //  Create an assembly view model.
                    assemblyName = enumAssembly.GetNextAssembly();
                }
                gacItem.Children = gacList;

                completeList.Add(fileSystemParent);
                completeList.Add(gacItem);
            }
            else
            {
                if (src.IsDirectory)
                {
                    completeList = GetChildrenForDllListing(new DirectoryInfo(src.FullName));
                }
            }
            return(completeList);
        }
コード例 #6
0
ファイル: AboutBox.cs プロジェクト: yuriksf/PnP-Tools
 public AboutBox()
 {
     InitializeComponent();
     this.labelVersion.Text       = String.Format("Version {0}", AssemblyVersion);
     this.labelCopyright.Text     = AssemblyCopyright;
     this.labelCompanyName.Text   = AssemblyCompany;
     this.textBoxDescription.Text = AssemblyDescription.Replace("NL", Environment.NewLine);
     this.labelLink.Text          = "http://blogs.msdn.com/b/nadeemis/archive/2012/08/24/sharepoint-2013-search-rest-api.aspx";
 }
コード例 #7
0
 public AboutBasecampSync()
 {
     InitializeComponent();
     this.Text = String.Format("About {0}", AssemblyTitle);
     this.labelProductName.Text    = AssemblyProduct;
     this.labelVersion.Text        = String.Format("Version {0}", AssemblyVersion);
     this.labelCopyright.Text      = AssemblyCopyright;
     this.textBoxDescription.Lines = AssemblyDescription.Split('|');
 }
コード例 #8
0
        public void FusionProperties()
        {
            //  Get the first assembly in the global assembly cache.
            var someAssembly = new AssemblyDescription(new AssemblyCacheEnumerator().GetNextAssembly());

            //  Show the install references.
            foreach (var installReference in someAssembly.FusionProperties.InstallReferences)
            {
                System.Diagnostics.Trace.WriteLine(installReference.Description);
            }
        }
コード例 #9
0
        private AssemblyDescription GetAssemblyDescription(string fullName, string path)
        {
            // maybe we already have one like that (interning)
            if (assemblyFromAssemblyPath.ContainsKey(path))
            {
                return(assemblyFromAssemblyPath[path]);
            }
            var description = new AssemblyDescription(fullName, path);

            assemblyFromAssemblyPath.Add(path, description);
            return(description);
        }
コード例 #10
0
        public static XmlElement GetFrameworkXmlDoc(string assembly, string data, string prefix = "")
        {
            if (asmd == null)
            {
                return(null);
            }

            if (asmd.ContainsKey(assembly) == false)
            {
                return(null);
            }

            AssemblyDescription d = asmd[assembly];

            XmlElement xml = d.GetDocument(data, prefix);

            return(xml);
        }
コード例 #11
0
        public static Type FindTypeFromAssemblies(string name)
        {
            Type T = null;

            foreach (string s in asmd.Keys)
            {
                AssemblyDescription d = asmd[s];

                T = d.GetTypeForName(name);

                if (T != null)
                {
                    return(T);
                }
            }

            return(T);
        }
コード例 #12
0
        public void EnumerateAssemblies()
        {
            //  Create an assembly enumerator.
            var assemblyEnumerator = new AssemblyCacheEnumerator();

            //  Get the first assembly.
            var assemblyName = assemblyEnumerator.GetNextAssembly();

            //  Start to loop through the assemblies.
            while (assemblyName != null)
            {
                //  The 'assemblyName' object is a COM interface, if we create an
                //  AssemblyDescription from it, we will have access to more information.
                var assemblyDescription = new AssemblyDescription(assemblyName);

                //  Show the display name.
                System.Diagnostics.Trace.WriteLine("Display Name: " + assemblyDescription.DisplayName);

                //  Move to the next assembly.
                assemblyName = assemblyEnumerator.GetNextAssembly();
            }
        }
コード例 #13
0
        private void FindFrameworks()
        {
            if (frameworks == null || frameworks.Count < 0)
            {
                L = new ArrayList();

                var ac = new AssemblyCacheEnumerator();

                int i = 0;
                while (i < 2000)
                {
                    GACManagerApi.Fusion.IAssemblyName name = ac.GetNextAssembly();

                    if (name == null)
                    {
                        break;
                    }

                    //  Get the first assembly in the global assembly cache.
                    var someAssembly = new AssemblyDescription(name);

                    if (someAssembly == null)
                    {
                        break;
                    }

                    if (someAssembly.Name == null)
                    {
                        break;
                    }

                    //  Show the Runtime Version.
                    System.Diagnostics.Trace.WriteLine(someAssembly.ReflectionProperties.RuntimeVersion);
                    //richTextBox1.AppendText("\n\n\n" + someAssembly.ReflectionProperties.RuntimeVersion);
                    //richTextBox1.AppendText("\n\n\n" + someAssembly.ReflectionProperties.ToString());

                    int p = L.IndexOf(someAssembly.ReflectionProperties.RuntimeVersion);

                    if (p < 0)
                    {
                        L.Add(someAssembly.ReflectionProperties.RuntimeVersion);
                    }

                    i++;
                }
            }
            else
            {
                L = new ArrayList();

                foreach (DirectoryInfo d in frameworks)
                {
                    L.Add(d.Name);
                }
            }
            ToolStripComboBox c = toolStripComboBox1;

            c.DropDownStyle = ComboBoxStyle.DropDownList;

            c.Items.Clear();

            foreach (string s in L)
            {
                c.Items.Add(s);
            }

            if (c.Items.Count > 0)
            {
                c.SelectedIndex = c.Items.Count - 1;
            }
        }
コード例 #14
0
        private TypeName(string s, ref int index)
        {
            try
            {
                var startIndex = index;

                var nameStartIndex = startIndex;
                var nameEndIndex   = (int?)null;

                var assemblyDescriptionStartIndex = (int?)null;
                var assemblyDescriptionEndIndex   = (int?)null;

                var hasGroupingBracket = false;

                var state = State.Name;

                for (; index < s.Length; ++index)
                {
                    var currentCharacter = s[index];
                    var nextCharacter    = index + 1 < s.Length ? s[index + 1] : (char?)null;

                    if (state == State.Name)
                    {
                        if (currentCharacter == '[')
                        {
                            if (index == startIndex)
                            {
                                // Skip type grouping bracket
                                hasGroupingBracket = true;
                                nameStartIndex++;
                            }
                            else if (nextCharacter == ']' || nextCharacter == ',')
                            {
                                // Square bracket delimits an array
                                state = State.Array;
                            }
                            else
                            {
                                // Square bracket delimits the generic argument list
                                nameEndIndex = index;
                                state        = State.Generics;
                            }
                        }
                        else if (currentCharacter == ']')
                        {
                            if (hasGroupingBracket)
                            {
                                // We finished the current grouping, break out
                                break;
                            }
                        }
                        else if (currentCharacter == ',')
                        {
                            // We're entering assembly description

                            state = State.Assembly;

                            assemblyDescriptionStartIndex = index + 1;

                            if (nameEndIndex == null)
                            {
                                nameEndIndex = index;
                            }
                        }
                    }
                    else if (state == State.Array)
                    {
                        if (currentCharacter == ']')
                        {
                            state = State.Name;
                        }
                    }
                    else if (state == State.Generics)
                    {
                        if (currentCharacter == ']')
                        {
                            state = State.Name;
                        }
                        else if (currentCharacter == ',' || currentCharacter == ' ')
                        {
                            // Generic delimiters
                        }
                        else
                        {
                            GenericParameters.Add(new TypeName(s, ref index));
                        }
                    }
                    else if (state == State.Assembly)
                    {
                        if (currentCharacter == ']')
                        {
                            if (hasGroupingBracket)
                            {
                                // We finished the current grouping, break out
                                assemblyDescriptionEndIndex = index;
                                break;
                            }
                        }
                    }
                }

                if (nameEndIndex == null)
                {
                    nameEndIndex = s.Length;
                }

                if (assemblyDescriptionEndIndex == null)
                {
                    assemblyDescriptionEndIndex = s.Length;
                }

                Name = s.Substring(nameStartIndex, nameEndIndex.Value - nameStartIndex);

                if (Name.Contains('+'))
                {
                    var nestedNames = Name.Split('+');

                    foreach (var nestedName in nestedNames)
                    {
                        nestedName.PartsAround('`', out var name, out var genericarity);

                        names.Add(name);

                        if (genericarity != null)
                        {
                            genericarities.Add(int.Parse(genericarity));
                        }
                        else
                        {
                            genericarities.Add(0);
                        }
                    }
                }
                else
                {
                    Name.PartsAround('`', out var name, out var genericarity);

                    names.Add(name);

                    if (genericarity != null)
                    {
                        genericarities.Add(int.Parse(genericarity));
                    }
                    else
                    {
                        genericarities.Add(0);
                    }
                }

                if (assemblyDescriptionStartIndex != null)
                {
                    AssemblyDescription = s.Substring(assemblyDescriptionStartIndex.Value, assemblyDescriptionEndIndex.Value - assemblyDescriptionStartIndex.Value);

                    var parts = AssemblyDescription.Split(',')
                                .Select(x => x.Trim())
                                .ToList();

                    AssemblyVersion        = LookForPairThenRemove(parts, "Version");
                    AssemblyCulture        = LookForPairThenRemove(parts, "Culture");
                    AssemblyPublicKeyToken = LookForPairThenRemove(parts, "PublicKeyToken");

                    if (parts.Count > 0)
                    {
                        AssemblyName = parts[0];
                    }
                }
            }
            catch (Exception ex)
            {
                throw new FormatException($"Failed to parse type name: {s}", ex);
            }
        }
コード例 #15
0
        private static AssemblyDescription GetGacAssemblyPath(String moduleName)
        {
            ////String embedResourcePath = "DXApplication";
            ////String embedResourceCategoryPath = "Path";
            String dllModuleName = moduleName;

            //  Create an assembly cache enumerator.
            var assemblyCacheEnum = new AssemblyCacheEnumerator(null);

            //  Enumerate the assemblies.
            var assemblyName = assemblyCacheEnum.GetNextAssembly();

            while (assemblyName != null)
            {
                //  Create the assembly description.
                var desc = new AssemblyDescription(assemblyName);

                if (desc.Name.Equals(dllModuleName))
                {
                    //  We'll need a display name of the assembly to uninstall.
                    ////var displayName = @"Apex, Version=1.4.0.0, Culture=neutral, PublicKeyToken=98d06957926c086d, processorArchitecture=MSIL";
                    var displayName = desc.DisplayName;
                    //  When we try to uninstall an assembly, an uninstall disposition will be
                    //  set to indicate the success of the operation.
                    var uninstallDisposition = IASSEMBLYCACHE_UNINSTALL_DISPOSITION.Unknown;

                    //  Install the assembly, without an install reference.
                    try
                    {
                        IAssemblyCache ac = AssemblyCache.GetIAssemblyCache(displayName, null);
                        if (ac != null)
                        {
                            return(desc);
                        }
                    }
                    catch (Exception exception)
                    {
                        //  We've failed to uninstall the assembly.
                        throw new InvalidOperationException("Failed to uninstall the assembly.", exception);
                    }
                    finally
                    {
                        ////////assemblyName = null;
                    }
                    //////////  Did we succeed?
                    ////////if (uninstallDisposition == IASSEMBLYCACHE_UNINSTALL_DISPOSITION.IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED)
                    ////////{
                    ////////    //  Hooray!
                    ////////    if (false)
                    ////////    {
                    ////////        assemblyName = null;
                    ////////    }
                    ////////    else
                    ////////    {
                    ////////        //  Create an assembly cache enumerator.
                    ////////        assemblyCacheEnum = new AssemblyCacheEnumerator(null);
                    ////////        //  Enumerate the assemblies.
                    ////////        assemblyName = assemblyCacheEnum.GetNextAssembly();
                    ////////    }
                    ////////}
                }
                else
                {
                    assemblyName = assemblyCacheEnum.GetNextAssembly();
                }
            }
            return(null);
        }
コード例 #16
0
 public bool TryInitialize(ScopeNode scopeNode, AssemblyDescription resourceAssembly, ViewAssemblyDescription viewAssemblyDescription)
 {
     return(true);
 }
コード例 #17
0
        private void ParseAssemblyRules(IEnumerable<Rule> assemblyRules)
        {
            foreach (var a in assemblyRules)
            {
                var assm = new AssemblyDescription { PrimaryFile = a.Parameter.FixFilepathSlashes() };
                if (ValidVal(a.Prop("name")))
                {
                    assm.SetPropertyAndRuleProp("Name", a.Prop("name"));
                }

                //get all the includes
                var includes = from p in a.Properties
                               where p.Name == "include"
                               select p;
                foreach (var i in includes)
                {
                    assm.AddInclude(i);
                }

                var excludes = from p in a.Properties
                               where p.Name == "exclude"
                               select p;

                foreach (var e in excludes)
                {
                    assm.AddExclude(e);
                }
                _package.SharedLibs = _package.SharedLibs ?? new SharedLib();
                _package.SharedLibs.Assemblies.Add(assm);

                if (ValidVal(a.Prop("global")))
                {
                    assm.SetPropertyAndRuleProp("GlobalEntry", a.Prop("global"));
                }
            }
        }
コード例 #18
0
        private static void UnregisterDll(String moduleName, Boolean log = false)
        {
            ////String embedResourcePath = "DXApplication";
            ////String embedResourceCategoryPath = "Path";
            String dllModuleName = moduleName;

            //  Create an assembly cache enumerator.
            var assemblyCacheEnum = new AssemblyCacheEnumerator(null);

            //  Enumerate the assemblies.
            var assemblyName = assemblyCacheEnum.GetNextAssembly();

            while (assemblyName != null)
            {
                //  Create the assembly description.
                var desc = new AssemblyDescription(assemblyName);

                if (desc.Name.Equals(dllModuleName))
                {
                    //  We'll need a display name of the assembly to uninstall.
                    ////var displayName = @"Apex, Version=1.4.0.0, Culture=neutral, PublicKeyToken=98d06957926c086d, processorArchitecture=MSIL";
                    var displayName = desc.DisplayName;
                    //  When we try to uninstall an assembly, an uninstall disposition will be
                    //  set to indicate the success of the operation.
                    var uninstallDisposition = IASSEMBLYCACHE_UNINSTALL_DISPOSITION.Unknown;

                    //  Install the assembly, without an install reference.
                    try
                    {
                        AssemblyCache.UninstallAssembly(displayName, null, out uninstallDisposition);
                        //  Depending on the result, show the appropriate message.
                        string message = string.Empty;
                        switch (uninstallDisposition)
                        {
                        case IASSEMBLYCACHE_UNINSTALL_DISPOSITION.Unknown:
                            message = "Failed to uninstall assembly.";
                            break;

                        case IASSEMBLYCACHE_UNINSTALL_DISPOSITION.IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED:
                            message = "The assembly was uninstalled successfully!";
                            break;

                        case IASSEMBLYCACHE_UNINSTALL_DISPOSITION.IASSEMBLYCACHE_UNINSTALL_DISPOSITION_STILL_IN_USE:
                            message = "Cannot uninstall this assembly - it is in use.";
                            break;

                        case IASSEMBLYCACHE_UNINSTALL_DISPOSITION.IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED:
                            message = "Cannot uninstall this assembly - it has already been uninstalled.";
                            break;

                        case IASSEMBLYCACHE_UNINSTALL_DISPOSITION.IASSEMBLYCACHE_UNINSTALL_DISPOSITION_DELETE_PENDING:
                            message = "Cannot uninstall this assembly - it has has a delete pending.";
                            break;

                        case IASSEMBLYCACHE_UNINSTALL_DISPOSITION.IASSEMBLYCACHE_UNINSTALL_DISPOSITION_HAS_INSTALL_REFERENCES:
                            message = "Cannot uninstall this assembly - it was installed as part of another product.";
                            break;

                        case IASSEMBLYCACHE_UNINSTALL_DISPOSITION.IASSEMBLYCACHE_UNINSTALL_DISPOSITION_REFERENCE_NOT_FOUND:
                            message = "Cannot uninstall this assembly - cannot find the assembly.";
                            break;

                        default:
                            break;
                        }
                        if (log)
                        {
                        }
                    }
                    catch (Exception exception)
                    {
                        //  We've failed to uninstall the assembly.
                        throw new InvalidOperationException("Failed to uninstall the assembly.", exception);
                    }
                    finally
                    {
                        ////////assemblyName = null;
                    }
                    //  Did we succeed?
                    if (uninstallDisposition == IASSEMBLYCACHE_UNINSTALL_DISPOSITION.IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED)
                    {
                        //  Hooray!
                        if (false)
                        {
                            assemblyName = null;
                        }
                        else
                        {
                            //  Create an assembly cache enumerator.
                            assemblyCacheEnum = new AssemblyCacheEnumerator(null);
                            //  Enumerate the assemblies.
                            assemblyName = assemblyCacheEnum.GetNextAssembly();
                        }
                    }
                }
                else
                {
                    assemblyName = assemblyCacheEnum.GetNextAssembly();
                }
            }
        }
コード例 #19
0
ファイル: TypeManager.cs プロジェクト: rte-se/emul8
 private AssemblyDescription GetAssemblyDescription(string fullName, string path)
 {
     // maybe we already have one like that (interning)
     if(assemblyFromAssemblyPath.ContainsKey(path))
     {
         return assemblyFromAssemblyPath[path];
     }
     var description = new AssemblyDescription(fullName, path);
     assemblyFromAssemblyPath.Add(path, description);
     return description;
 }
コード例 #20
0
        public static List <DotnetLibrary> GetGACLibraries()
        {
            var gacList = new List <DotnetLibrary>();

            try
            {
                var assemblyEnumerator = new AssemblyCacheEnumerator();

                var assemblyName = assemblyEnumerator.GetNextAssembly();

                while (assemblyName != null)
                {
                    var assemblyDescription = new AssemblyDescription(assemblyName);

                    string name = assemblyDescription.Name;
                    bool   probablyMicrosoftPackage = (name.StartsWith("Microsoft", StringComparison.Ordinal) || name.StartsWith("System", StringComparison.Ordinal));
                    if (!probablyMicrosoftPackage)
                    {
                        var gacLib = new DotnetLibrary
                        {
                            Culture = assemblyDescription.Culture,
                            ProcessorArchitecture = assemblyDescription.ProcessorArchitecture,
                            Name     = name,
                            Version  = assemblyDescription.Version,
                            Filepath = assemblyDescription.Path,
                        };
                        FileInfo fi = new FileInfo(gacLib.Filepath);
                        if (fi.Exists)
                        {
                            gacLib.Filename = fi.Name;
                            FileVersionInfo fvi                  = FileVersionInfo.GetVersionInfo(gacLib.Filepath);
                            bool            isDllFile            = fvi.FileVersion != null;
                            bool            isMicrosoftCopyright = fvi.LegalCopyright != null && fvi.LegalCopyright.Contains("Microsoft Corporation");

                            if (isDllFile && !isMicrosoftCopyright)
                            {
                                gacLib.FileDescription = fvi.FileDescription;
                                gacLib.Version         = fvi.FileVersion;
                                gacLib.ProductName     = fvi.ProductName;
                                gacLib.ProductVersion  = fvi.ProductVersion;
                                gacLib.Copyright       = fvi.LegalCopyright;
                                gacLib.Language        = fvi.Language;
                                gacLib.SHA1Hash        = GetFileSHA1(gacLib.Filepath);
                                gacLib.Md5Hash         = GetFileMD5(gacLib.Filepath);
                                try
                                {
                                    gacLib.Issue = LibraryIssueChecker.GetIssue(gacLib);
                                }
                                catch
                                {
                                    gacLib.Issue = null;
                                }

                                gacList.Add(gacLib);
                            }
                        }
                    }

                    assemblyName = assemblyEnumerator.GetNextAssembly();
                }
            }
            catch (Exception ex)
            {
                Trace.TraceWarning("Could not load DLL list from the GAC. Error: {0}", ex.ToString());
                Console.Error.WriteLine("Could not load DLL list from the GAC.");
                return(new List <DotnetLibrary>());
            }

            return(gacList);
        }
コード例 #21
0
 public ResourceRouteHandler(Assembly assembly)
 {
     //Contract.Requires( assembly != null );
     _themedAssemblies[""] = _root = new AssemblyDescription(assembly);
 }