Esempio n. 1
0
            private IMethodSymbol ResolveEqualityComparerEquals([NotNull] Compilation compilation)
            {
                INamedTypeSymbol equalityComparerType = KnownTypes.SystemCollectionsGenericEqualityComparerT(compilation);

                return(equalityComparerType?.GetMembers("Equals").OfType <IMethodSymbol>().FirstOrDefault());
            }
Esempio n. 2
0
            private IMethodSymbol ResolveNullableEquals([NotNull] Compilation compilation)
            {
                INamedTypeSymbol nullableType = KnownTypes.SystemNullableT(compilation);

                return(nullableType?.GetMembers("Equals").OfType <IMethodSymbol>().FirstOrDefault());
            }
Esempio n. 3
0
            private IMethodSymbol ResolveObjectReferenceEquals([NotNull] Compilation compilation)
            {
                INamedTypeSymbol objectType = KnownTypes.SystemObject(compilation);

                return(objectType?.GetMembers("ReferenceEquals").OfType <IMethodSymbol>().FirstOrDefault());
            }
Esempio n. 4
0
            private IMethodSymbol ResolveStaticObjectEquals([NotNull] Compilation compilation)
            {
                INamedTypeSymbol objectType = KnownTypes.SystemObject(compilation);

                return(objectType?.GetMembers("Equals").OfType <IMethodSymbol>().FirstOrDefault(method => method.IsStatic));
            }
Esempio n. 5
0
            private static IPropertySymbol ResolveNullableValueProperty([NotNull] Compilation compilation)
            {
                INamedTypeSymbol nullableType = KnownTypes.SystemNullableT(compilation);

                return(nullableType?.GetMembers("Value").OfType <IPropertySymbol>().FirstOrDefault());
            }