Beispiel #1
0
 /// <summary>
 /// Set the target framework paths.
 /// This is used to optimize IO in the case of files requested from one
 /// of the FX folders.
 /// </summary>
 /// <param name="providedFrameworkPaths"></param>
 /// <param name="installedAssemblyTables"></param>
 internal void SetInstalledAssemblyInformation
 (
     AssemblyTableInfo[] installedAssemblyTableInfos
 )
 {
     redistList = RedistList.GetRedistList(installedAssemblyTableInfos);
 }
        public static RedistList GetRedistList(AssemblyTableInfo[] assemblyTables)
        {
            if (assemblyTables == null)
            {
                throw new ArgumentNullException("assemblyTables");
            }
            Array.Sort <AssemblyTableInfo>(assemblyTables);
            StringBuilder builder = (assemblyTables.Length > 0) ? new StringBuilder(assemblyTables[0].Descriptor) : new StringBuilder();

            for (int i = 1; i < assemblyTables.Length; i++)
            {
                builder.Append(';');
                builder.Append(assemblyTables[i].Descriptor);
            }
            string key = builder.ToString();

            lock (cachedRedistListLock)
            {
                if (cachedRedistList.ContainsKey(key))
                {
                    return((RedistList)cachedRedistList[key]);
                }
                RedistList list = new RedistList(assemblyTables);
                cachedRedistList.Add(key, list);
                return(list);
            }
        }
Beispiel #3
0
 /// <summary>
 /// Construct.
 /// </summary>
 internal InstalledAssemblies(RedistList redistList)
 {
     _redistList = redistList;
 }