Search Results for

    Show / Hide Table of Contents

    Class StandardAccessRules

    The "standard" access rules, which determine accessibility based on access modifiers.

    Inheritance
    object
    AccessRules
    StandardAccessRules
    Inherited Members
    AccessRules.CanAccess(ITypeMember, ITypeMember)
    AccessRules.CanAccess(ITypeMember, IType)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.TypeSystem
    Assembly: Flame.dll
    Syntax
    public sealed class StandardAccessRules : AccessRules

    Constructors

    | Edit this page View Source

    StandardAccessRules(SubtypingRules)

    Creates "standard" access rules from subtyping rules.

    Declaration
    public StandardAccessRules(SubtypingRules subtyping)
    Parameters
    Type Name Description
    SubtypingRules subtyping

    Subtyping rules to use for resolving protected access modifiers.

    | Edit this page View Source

    StandardAccessRules(SubtypingRules, Func<IMember, IType, bool>)

    Creates "standard" access rules from subtyping rules and an export predicate.

    Declaration
    public StandardAccessRules(SubtypingRules subtyping, Func<IMember, IType, bool> isExportedTo)
    Parameters
    Type Name Description
    SubtypingRules subtyping

    Subtyping rules to use for resolving protected access modifiers.

    Func<IMember, IType, bool> isExportedTo

    A predicate that tells if a member is exported to a type, circumventing standard access rules.

    Properties

    | Edit this page View Source

    IsExportedTo

    Tells if a member is exported to a type, circumventing standard access rules.

    Declaration
    public Func<IMember, IType, bool> IsExportedTo { get; }
    Property Value
    Type Description
    Func<IMember, IType, bool>

    A predicate that determines if a member is exported.

    | Edit this page View Source

    Subtyping

    Gets the subtyping rules to rely on for resolving protected members.

    Declaration
    public SubtypingRules Subtyping { get; }
    Property Value
    Type Description
    SubtypingRules

    Subtyping rules.

    Methods

    | Edit this page View Source

    CanAccess(IType, IType)

    Tells if one type has access to another.

    Declaration
    public override bool CanAccess(IType accessor, IType accessed)
    Parameters
    Type Name Description
    IType accessor

    A type that tries to access accessed.

    IType accessed

    Any type.

    Returns
    Type Description
    bool

    true if accessor can access accessed; otherwise, false.

    Overrides
    AccessRules.CanAccess(IType, IType)
    | Edit this page View Source

    CanAccess(IType, ITypeMember)

    Tells if a type has access to a member.

    Declaration
    public override bool CanAccess(IType accessor, ITypeMember accessed)
    Parameters
    Type Name Description
    IType accessor

    A type that tries to access accessed.

    ITypeMember accessed

    Any member.

    Returns
    Type Description
    bool

    true if accessor can access accessed; otherwise, false.

    Overrides
    AccessRules.CanAccess(IType, ITypeMember)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX