Mono.Cecil.BaseAssemblyResolver.GetGacPaths C# (CSharp) Method

GetGacPaths() static private method

static private GetGacPaths ( ) : Collection
return Collection
        static Collection<string> GetGacPaths()
        {
            if (on_mono)
                return GetDefaultMonoGacPaths ();

            var paths = new Collection<string> (2);
            var windir = Environment.GetEnvironmentVariable ("WINDIR");
            if (windir == null)
                return paths;

            paths.Add (Path.Combine (windir, "assembly"));
            paths.Add (Path.Combine (windir, Path.Combine ("Microsoft.NET", "assembly")));
            return paths;
        }

Usage Example

Esempio n. 1
0
 private AssemblyDefinition GetAssemblyInGac(AssemblyNameReference reference, ReaderParameters parameters)
 {
     if (reference.PublicKeyToken == null || reference.PublicKeyToken.Length == 0)
     {
         return(null);
     }
     if (this.gac_paths == null)
     {
         this.gac_paths = BaseAssemblyResolver.GetGacPaths();
     }
     if (BaseAssemblyResolver.on_mono)
     {
         return(this.GetAssemblyInMonoGac(reference, parameters));
     }
     return(this.GetAssemblyInNetGac(reference, parameters));
 }