/// <inheritdoc/> protected override bool Implements(IInterfaceExposable member) { if (ReferenceEquals(member, this)) { return(false); } return((member.DeclarationType == DeclarationType.PropertyGet || member.DeclarationType == DeclarationType.Variable) && member.IsInterfaceMember && ((ClassModuleDeclaration)member.ParentDeclaration).Subtypes.Any(implementation => ReferenceEquals(implementation, ParentDeclaration)) && IdentifierName.Equals(member.ImplementingIdentifierName)); }
/// <summary> /// Provides a default implementation of IInterfaceExposable.InterfaceDeclaration /// </summary> /// <param name="member">The member to find the InterfaceDeclaration of.</param> /// <returns>Tthe Declaration of the interface that this is a member of, or null if IsInterfaceMember is false.</returns> internal static ClassModuleDeclaration InterfaceDeclaration(this IInterfaceExposable member) => member.ParentDeclaration is ClassModuleDeclaration parent && parent.IsInterface ? parent : null;
/// <inheritdoc/> protected abstract override bool Implements(IInterfaceExposable member);
/// <summary> /// Provides a default implementation of IInterfaceExposable.IsInterfaceMember /// </summary> /// <param name="member">The member to test.</param> /// <returns>Returns true if the member is part of an interface definition.</returns> internal static bool IsInterfaceMember(this IInterfaceExposable member) => (member.Accessibility == Accessibility.Public || member.Accessibility == Accessibility.Implicit) && member.InterfaceDeclaration != null;