示例#1
0
            public bool Match(string assemblyFile)
            {
                #if !SILVERLIGHT
                var asmName = AssemblyName.GetAssemblyName(assemblyFile);
#else
                var asmName = new AssemblyName(assemblyFile);
#endif

                if (!AssemblyNameComparer.Equals(SourceName, asmName, false))
                {
                    return(false);
                }


                var item = new AssemblyNameResult {
                    AssemblyFile = assemblyFile, AssemblyName = asmName
                };
                if (SourceName.Version != null && SourceName.Version.Equals(asmName.Version))
                {
                    FullMatchedResult = item;
                    return(true);
                }
                else if (!IncludeVersion)
                {
                    FullMatchedResult = item;
                    return(true);
                }

                Results.Add(item);

                return(false);
            }
示例#2
0
            public bool Match(string assemblyFile)
            {
                #if !SILVERLIGHT
                var asmName = AssemblyName.GetAssemblyName(assemblyFile);
#else
                var asmName = new AssemblyName(assemblyFile);
#endif

                if (!AssemblyNameComparer.Equals(SourceName, asmName, false))
                    return false;


                var item = new AssemblyNameResult { AssemblyFile = assemblyFile, AssemblyName = asmName };
                if (SourceName.Version != null && SourceName.Version.Equals(asmName.Version))
                {
                    FullMatchedResult = item;
                    return true;
                }
                else if (!IncludeVersion)
                {
                    FullMatchedResult = item;
                    return true;
                }

                Results.Add(item);

                return false;
            }