Show / Hide Table of Contents

    Class StandardAccessRules

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

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

    Constructors

    | Improve this Doc 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.

    | Improve this Doc View Source

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

    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.

    System.Func<IMember, IType, System.Boolean> isExportedTo

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

    Properties

    | Improve this Doc 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
    System.Func<IMember, IType, System.Boolean>

    A predicate that determines if a member is exported.

    | Improve this Doc 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

    | Improve this Doc 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
    System.Boolean

    true if accessor can access accessed; otherwise, false.

    Overrides
    AccessRules.CanAccess(IType, IType)
    | Improve this Doc 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
    System.Boolean

    true if accessor can access accessed; otherwise, false.

    Overrides
    AccessRules.CanAccess(IType, ITypeMember)
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX