Class StandardAccessRules
The "standard" access rules, which determine accessibility based on access modifiers.
Inherited Members
Namespace: Flame.TypeSystem
Assembly: Flame.dll
Syntax
public sealed class StandardAccessRules : AccessRules
Constructors
| Improve this Doc View SourceStandardAccessRules(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. |
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 SourceIsExportedTo
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. |
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 SourceCanAccess(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 |
IType | accessed | Any type. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
| Improve this Doc View SourceCanAccess(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 |
ITypeMember | accessed | Any member. |
Returns
Type | Description |
---|---|
System.Boolean |
|