Example #1
0
            internal bool Equals(PortableLibraryFile otherLibrary)
            {
                if (!String.Equals(assemblySimpleName, otherLibrary.assemblySimpleName, StringComparison.OrdinalIgnoreCase))
                {
                    return(false);
                }

                if (!String.Equals(neutralResourceLanguage, otherLibrary.neutralResourceLanguage, StringComparison.OrdinalIgnoreCase))
                {
                    return(false);
                }

                Debug.Assert(OutputFiles != null, "This has not been initialized");
                Debug.Assert(otherLibrary.OutputFiles != null, "The other library has not been initialized");
                if (OutputFiles.Length != otherLibrary.OutputFiles.Length)
                {
                    return(false);
                }

                for (int i = 0; i < OutputFiles.Length; i++)
                {
                    if (!String.Equals(OutputFiles[i], otherLibrary.OutputFiles[i], StringComparison.OrdinalIgnoreCase))
                    {
                        return(false);
                    }
                }

                return(true);
            }
Example #2
0
        internal void UpdatePortableLibrary(PortableLibraryFile library)
        {
            PortableLibraryFile cached = (PortableLibraryFile)portableLibraries.GetDependencyFile(library.FileName);

            if (cached == null || !library.Equals(cached))
            {
                // Add a new entry or replace the existing one.
                portableLibraries.AddDependencyFile(library.FileName, library);
                isDirty = true;
            }
        }
Example #3
0
        internal PortableLibraryFile TryGetPortableLibraryInfo(string libraryPath)
        {
            // First, try to retrieve the portable library information from our hashtable.
            PortableLibraryFile retVal = (PortableLibraryFile)portableLibraries.GetDependencyFile(libraryPath);

            // The file is in our cache.  Make sure it's up to date.  If not, discard
            // this entry from the cache and rebuild all the state at a later point.
            if (retVal != null && retVal.HasFileChanged())
            {
                portableLibraries.RemoveDependencyFile(libraryPath);
                isDirty = true;
                retVal  = null;
            }

            return(retVal);
        }
Example #4
0
            internal bool Equals(PortableLibraryFile otherLibrary)
            {
                if (!String.Equals(_assemblySimpleName, otherLibrary._assemblySimpleName, StringComparison.OrdinalIgnoreCase))
                {
                    return false;
                }

                if (!String.Equals(_neutralResourceLanguage, otherLibrary._neutralResourceLanguage, StringComparison.OrdinalIgnoreCase))
                {
                    return false;
                }

                Debug.Assert(OutputFiles != null, "This has not been initialized");
                Debug.Assert(otherLibrary.OutputFiles != null, "The other library has not been initialized");
                if (OutputFiles.Length != otherLibrary.OutputFiles.Length)
                {
                    return false;
                }

                for (int i = 0; i < OutputFiles.Length; i++)
                {
                    if (!String.Equals(OutputFiles[i], otherLibrary.OutputFiles[i], StringComparison.OrdinalIgnoreCase))
                    {
                        return false;
                    }
                }

                return true;
            }
Example #5
0
 internal void UpdatePortableLibrary(PortableLibraryFile library)
 {
     PortableLibraryFile cached = (PortableLibraryFile)_portableLibraries.GetDependencyFile(library.FileName);
     if (cached == null || !library.Equals(cached))
     {
         // Add a new entry or replace the existing one.
         _portableLibraries.AddDependencyFile(library.FileName, library);
         _isDirty = true;
     }
 }