Class CsProperty
Data model that represents the definition of a property.
Implements
Inherited Members
Namespace: CodeFactory.DotNet.CSharp
Assembly: CodeFactory.DotNet.dll
Syntax
public abstract class CsProperty : CsMember, ICsProperty, ICsMember, ICsModel, ICsAttributes, IParent, IDotNetProperty, IDotNetMember, IDotNetModel, IModelStatus, ISourceFiles, IDotNetAttributes, IDocumentation, IParent, ILookup
Constructors
| Improve this Doc View SourceCsProperty(bool, bool, bool, SourceCodeType, IReadOnlyList<CsAttribute>, string, IReadOnlyList<string>, bool, string, string, string, string, CsSecurity, bool, CsMethod, bool, CsMethod, bool, CsMethod, bool, bool, bool, bool, bool, CsType, CsSecurity, CsSecurity, string, ModelStore<ICsModel>, IReadOnlyList<ModelLoadException>)
Constructor for the CsProperty
Declaration
protected CsProperty(bool isLoaded, bool hasErrors, bool loadedFromSource, SourceCodeType language, IReadOnlyList<CsAttribute> attributes, string modelSourceFile, IReadOnlyList<string> sourceFiles, bool hasDocumentation, string documentation, string lookupPath, string name, string parentPath, CsSecurity security, bool hasGet, CsMethod getMethod, bool hasSet, CsMethod setMethod, bool hasInit, CsMethod initMethod, bool isAbstract, bool isVirtual, bool isSealed, bool isOverride, bool isStatic, CsType propertyType, CsSecurity getSecurity, CsSecurity setSecurity, string sourceDocument = null, ModelStore<ICsModel> modelStore = null, IReadOnlyList<ModelLoadException> modelErrors = null)
Parameters
Type | Name | Description |
---|---|---|
bool | isLoaded | Flag that determines if the model was loaded. |
bool | hasErrors | Flag that determine if errors were found creating the model. |
bool | loadedFromSource | Flag that determines if the model was loaded from source code or from an existing library. |
SourceCodeType | language | The target language the model was generated from. |
IReadOnlyList<CsAttribute> | attributes | List of the attributes assigned to this model. |
string | modelSourceFile | The source file the model was generated from. |
IReadOnlyList<string> | sourceFiles | List of the fully qualified paths to the source code files this member is defined in. |
bool | hasDocumentation | Flag that determines if the model has XML documentation assigned to it. |
string | documentation | The xml documentation assigned to the model. |
string | lookupPath | The fully qualified model lookup path for this model. |
string | name | The name of the model. |
string | parentPath | THe fully qualified lookup path for the parent model to this one. |
CsSecurity | security | The security scope assigned to this model. |
bool | hasGet | Flag that determines if the property implements a getter. |
CsMethod | getMethod | The get accessor method assigned to the property |
bool | hasSet | Flag that determines if the property implements a setter. |
CsMethod | setMethod | The set accessor method assigned to the property. |
bool | hasInit | Flag that determines if the property implements a init accessor. |
CsMethod | initMethod | The init accessor method assigned to the property. |
bool | isAbstract | Flag that determines if the model is abstract. |
bool | isVirtual | Flag that determines if the model is virtual. |
bool | isSealed | Flag that determines if the model is sealed. |
bool | isOverride | Flag that determines if the model is overridden. |
bool | isStatic | Flag that determines if the model is static. |
CsType | propertyType | The type the property supports. |
CsSecurity | getSecurity | The security access assigned to the getter. |
CsSecurity | setSecurity | The security access assigned to the setter. |
string | sourceDocument | The source document that was used to build this model. This is optional parameter and can be null. |
ModelStore<ICsModel> | modelStore | Optional the lookup storage for models created during the compile or lookup of the model. |
IReadOnlyList<ModelLoadException> | modelErrors | Optional the error that occurred while creating the model. |
Properties
| Improve this Doc View SourceGetMethod
Provides access to the get method statement in the property. This will be null if the property does not have a get statement.
Declaration
public CsMethod GetMethod { get; }
Property Value
Type | Description |
---|---|
CsMethod |
GetSecurity
The security scope that is assigned to the get accessor. Make sure you check the HasGet to determine if the property supports get operations.
Declaration
public CsSecurity GetSecurity { get; }
Property Value
Type | Description |
---|---|
CsSecurity |
HasGet
Flag that determines if this property supports get access.
Declaration
public bool HasGet { get; }
Property Value
Type | Description |
---|---|
bool |
HasInit
Flag that determines if this property supports init accessor.
Declaration
public bool HasInit { get; }
Property Value
Type | Description |
---|---|
bool |
HasSet
Flag that determines if this property supports set access.
Declaration
public bool HasSet { get; }
Property Value
Type | Description |
---|---|
bool |
IsAbstract
Flag that determines if the property is implemented as an abstract property.
Declaration
public bool IsAbstract { get; }
Property Value
Type | Description |
---|---|
bool |
IsOverride
Flag that determines if the property has been overridden.
Declaration
public bool IsOverride { get; }
Property Value
Type | Description |
---|---|
bool |
IsSealed
Flag that determines if the property has been sealed.
Declaration
public bool IsSealed { get; }
Property Value
Type | Description |
---|---|
bool |
IsStatic
Flag that determines if the property has been implemented as static.
Declaration
public bool IsStatic { get; }
Property Value
Type | Description |
---|---|
bool |
IsVirtual
Flag that determines if the property is implemented as virtual.
Declaration
public bool IsVirtual { get; }
Property Value
Type | Description |
---|---|
bool |
PropertyType
The source data type that is managed by this property.
Declaration
public CsType PropertyType { get; }
Property Value
Type | Description |
---|---|
CsType |
SetMethod
Provides access to the set method statement in the property. This will be null if the property does not have a set statement.
Declaration
public CsMethod SetMethod { get; }
Property Value
Type | Description |
---|---|
CsMethod |
SetSecurity
The security scope that is assigned to the set accessor. Make sure you check the HasSet to determine if the property supports set operations.
Declaration
public CsSecurity SetSecurity { get; }
Property Value
Type | Description |
---|---|
CsSecurity |
Methods
| Improve this Doc View SourceLoadGetBodySyntaxAsync()
The source code syntax that is stored in the body of the property get. This will be null if was not loaded from source code.
Declaration
[Obsolete("This will be removed in later editions of the SDK. Use the GetMethod property to access the get method details.", false)]
public abstract Task<string> LoadGetBodySyntaxAsync()
Returns
Type | Description |
---|---|
Task<string> |
LoadSetBodySyntaxAsync()
The source code syntax that is stored in the body of the property get. This will be null if was not loaded from source code.
Declaration
[Obsolete("This will be removed in later editions of the SDK. Use the SetMethod property to access the set method details.", false)]
public abstract Task<string> LoadSetBodySyntaxAsync()
Returns
Type | Description |
---|---|
Task<string> |
Explicit Interface Implementations
| Improve this Doc View SourceIDotNetProperty.GetMethod
Provides access to the get method statement in the property. This will be null if the property does not have a get statement.
Declaration
IDotNetMethod IDotNetProperty.GetMethod { get; }
Returns
Type | Description |
---|---|
IDotNetMethod |
IDotNetProperty.GetSecurity
The security scope that is assigned to the get accessor. Make sure you check the HasGet to determine if the property supports get operations.
Declaration
DotNetSecurity IDotNetProperty.GetSecurity { get; }
Returns
Type | Description |
---|---|
DotNetSecurity |
IDotNetProperty.InitMethod
Provides access to the init method statement in the property. This will be null if the property does not have a init statement.
Declaration
IDotNetMethod IDotNetProperty.InitMethod { get; }
Returns
Type | Description |
---|---|
IDotNetMethod |
IDotNetProperty.PropertyType
The source data type that is managed by this property.
Declaration
IDotNetType IDotNetProperty.PropertyType { get; }
Returns
Type | Description |
---|---|
IDotNetType |
IDotNetProperty.SetMethod
Provides access to the set method statement in the property. This will be null if the property does not have a set statement.
Declaration
IDotNetMethod IDotNetProperty.SetMethod { get; }
Returns
Type | Description |
---|---|
IDotNetMethod |
IDotNetProperty.SetSecurity
The security scope that is assigned to the set accessor. Make sure you check the HasSet to determine if the property supports set operations.
Declaration
DotNetSecurity IDotNetProperty.SetSecurity { get; }
Returns
Type | Description |
---|---|
DotNetSecurity |