Accessibility

Responsible for encapsulating the retrieval and translation of the CodeGeneration annotations in the EntityFramework Metadata to a form that is useful in code generation.

Syntax

public static class Accessibility

Inheritance

Methods

ForGetter

public static string ForGetter(EdmMember member)
Gets the accessibility that should be applied at the get level for a property being generated from the provided EdmMember. defaults to empty if no annotation is found or the accessibility is the same as the property level.

Parameters

Returns

string

ForMethod

public static string ForMethod(EdmFunction function)
Gets the accessibility that should be applied to a method being generated from the provided EdmFunction. defaults to public if no annotation is found.

Parameters

Returns

string

ForNavigationProperty

public static string ForNavigationProperty(NavigationProperty navProp)
Gets the accessibility that should be applied to a NavigationProperty being generated Looks up the accessibility for the property (as defined by its getterAccess and setterAccess) and compares to the accessibility for the target type (as defined by its typeAccess) and takes the minimum

Parameters

Returns

string

ForProperty

public static string ForProperty(EdmMember member)
Gets the accessibility that should be applied at the property level for a property being generated from the provided EdmMember. defaults to public if no annotation is found.

Parameters

Returns

string

ForReadOnlyProperty

public static string ForReadOnlyProperty(EdmMember member)
Gets the accessibility that should be applied at the property level for a Read-Only property being generated from the provided EdmMember. defaults to public if no annotation is found.

Parameters

Returns

string

ForReadOnlyProperty

public static string ForReadOnlyProperty(EntitySet set)
Gets the accessibility that should be applied at the property level for a property being generated from the provided EntitySet. defaults to public if no annotation is found.

Parameters

Returns

string

ForSetter

public static string ForSetter(EdmMember member)
Gets the accessibility that should be applied at the set level for a property being generated from the provided EdmMember. defaults to empty if no annotation is found or the accessibility is the same as the property level.

Parameters

Returns

string

ForType

public static string ForType(GlobalItem item)
Gets the accessibility that should be applied to a type being generated from the provided GlobalItem. defaults to public if no annotation is found.

Parameters

Returns

string

ForWriteOnlyProperty

public static string ForWriteOnlyProperty(EdmMember member)
Gets the accessibility that should be applied at the property level for a Write-Only property being generated from the provided EdmMember. defaults to public if no annotation is found.

Parameters

Returns

string