C# Class EFUtility.CodeGenerationTools.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.
Mostra file Open project: jradxl/Entity-Framework-Code-Generation-Tools-Experiments

Public Methods

Method Description
CalculatePropertyAccessibility ( System.Data.Metadata.Edm.MetadataItem item, string &propertyAccessibility, string &getterAccessibility, string &setterAccessibility ) : void
ForGetter ( System.Data.Metadata.Edm.EdmMember member ) : string

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.

ForMethod ( EdmFunction function ) : string

Gets the accessibility that should be applied to a method being generated from the provided EdmFunction. defaults to public if no annotation is found.

ForProperty ( System.Data.Metadata.Edm.EdmMember member ) : string

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.

ForReadOnlyProperty ( System.Data.Metadata.Edm.EdmMember member ) : string

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.

ForReadOnlyProperty ( System.Data.Metadata.Edm.EntitySet set ) : string

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.

ForSetter ( System.Data.Metadata.Edm.EdmMember member ) : string

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.

ForType ( System.Data.Metadata.Edm.GlobalItem item ) : string

Gets the accessibility that should be applied to a type being generated from the provided GlobalItem. defaults to public if no annotation is found.

ForWriteOnlyProperty ( System.Data.Metadata.Edm.EdmMember member ) : string

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.

Private Methods

Method Description
GetAccessibility ( System.Data.Metadata.Edm.MetadataItem item, string name ) : string
TranslateUserAccessibilityToCSharpAccessibility ( string userAccessibility ) : string

Method Details

CalculatePropertyAccessibility() public static method

public static CalculatePropertyAccessibility ( System.Data.Metadata.Edm.MetadataItem item, string &propertyAccessibility, string &getterAccessibility, string &setterAccessibility ) : void
item System.Data.Metadata.Edm.MetadataItem
propertyAccessibility string
getterAccessibility string
setterAccessibility string
return void

ForGetter() public static method

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.
public static ForGetter ( System.Data.Metadata.Edm.EdmMember member ) : string
member System.Data.Metadata.Edm.EdmMember
return string

ForMethod() public static method

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

ForProperty() public static method

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.
public static ForProperty ( System.Data.Metadata.Edm.EdmMember member ) : string
member System.Data.Metadata.Edm.EdmMember
return string

ForReadOnlyProperty() public static method

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.
public static ForReadOnlyProperty ( System.Data.Metadata.Edm.EdmMember member ) : string
member System.Data.Metadata.Edm.EdmMember
return string

ForReadOnlyProperty() public static method

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.
public static ForReadOnlyProperty ( System.Data.Metadata.Edm.EntitySet set ) : string
set System.Data.Metadata.Edm.EntitySet
return string

ForSetter() public static method

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.
public static ForSetter ( System.Data.Metadata.Edm.EdmMember member ) : string
member System.Data.Metadata.Edm.EdmMember
return string

ForType() public static method

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

ForWriteOnlyProperty() public static method

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.
public static ForWriteOnlyProperty ( System.Data.Metadata.Edm.EdmMember member ) : string
member System.Data.Metadata.Edm.EdmMember
return string