Exemplo n.º 1
0
        public override bool IsImplementationForInterfaceMember(MemberSymbol interfaceMember)
        {
            var interfaceMethod = interfaceMember as MethodSymbol;

            if (interfaceMethod != null)
            {
                if (fxCopMethod.ImplementedInterfaceMethods.EmptyIfNull().Contains(interfaceMethod.fxCopMethod))
                {
                    // This method is an explicit interface implementation.
                    return(true);
                }

                bool isImplicitImplementation = Name == interfaceMethod.Name &&
                                                fxCopMethod.ParametersMatchStructurally(interfaceMethod.fxCopMethod.Parameters);

                // If, besides this method, an explicit implementation exists, that one wins.
                if (isImplicitImplementation && !ContainingTypeHasExplicitInterfaceImplementationFor(interfaceMethod))
                {
                    return(true);
                }
            }

            return(false);
        }
Exemplo n.º 2
0
 public abstract bool IsImplementationForInterfaceMember([NotNull] MemberSymbol interfaceMember);
 public override bool IsImplementationForInterfaceMember(MemberSymbol interfaceMember)
 {
     return(false);
 }