예제 #1
0
 private static bool CompareProfiles(string profile1, string profile2)
 {
     if (FrameworkNameEqualityComparer.IsDefaultOrClientProfile(profile1))
     {
         return(FrameworkNameEqualityComparer.IsDefaultOrClientProfile(profile2));
     }
     return(string.Equals(profile1, profile2, StringComparison.Ordinal));
 }
예제 #2
0
        public int GetHashCode(FrameworkName obj)
        {
            int hashCode = obj.Identifier.GetHashCode() ^ obj.Version.GetHashCode();

            if (!FrameworkNameEqualityComparer.IsDefaultOrClientProfile(obj.Profile))
            {
                hashCode = hashCode ^ obj.Profile.GetHashCode();
            }
            return(hashCode);
        }
예제 #3
0
        public static bool IsCurrentVersionSdkFrameworkName(FrameworkName targetFramework)
        {
            bool flag;

            using (IEnumerator <FrameworkName> enumerator = BlendSdkHelper.CurrentVersionSdkFrameworkNames.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    if (!FrameworkNameEqualityComparer.AreEquivalent(targetFramework, enumerator.Current))
                    {
                        continue;
                    }
                    flag = true;
                    return(flag);
                }
                return(false);
            }
            return(flag);
        }
예제 #4
0
 public bool Equals(FrameworkName frameworkName1, FrameworkName frameworkName2, bool checkIdentifiers, bool checkVersion, bool checkProfile)
 {
     if (object.ReferenceEquals(frameworkName1, null))
     {
         return(object.ReferenceEquals(frameworkName2, null));
     }
     if (object.ReferenceEquals(frameworkName2, null))
     {
         return(false);
     }
     if (checkIdentifiers && !FrameworkNameEqualityComparer.CompareIdentifiers(frameworkName1.Identifier, frameworkName2.Identifier) || checkVersion && !FrameworkNameEqualityComparer.CompareVersions(frameworkName1.Version, frameworkName2.Version))
     {
         return(false);
     }
     if (!checkProfile)
     {
         return(true);
     }
     return(FrameworkNameEqualityComparer.CompareProfiles(frameworkName1.Profile, frameworkName2.Profile));
 }
예제 #5
0
 public override bool SupportsFramework(FrameworkName frameworkName)
 {
     return(FrameworkNameEqualityComparer.AreEquivalent(frameworkName, BlendSdkHelper.WindowsPhone7));
 }
예제 #6
0
 public override bool SupportsFramework(FrameworkName frameworkName)
 {
     return(FrameworkNameEqualityComparer.AreEquivalent(frameworkName, BlendSdkHelper.Silverlight4));
 }
예제 #7
0
 public override bool SupportsFramework(FrameworkName frameworkName)
 {
     return(FrameworkNameEqualityComparer.AreEquivalent(frameworkName, this.supportedFramework));
 }