Class CsField
Data model that represents a field definition.
Implements
Inherited Members
Namespace: CodeFactory.DotNet.CSharp
Assembly: CodeFactory.DotNet.dll
Syntax
public abstract class CsField : CsMember, ICsField, ICsMember, ICsModel, ICsAttributes, IParent, IDotNetField, IDotNetMember, IDotNetModel, IModelStatus, ISourceFiles, IDotNetAttributes, IDocumentation, IParent, ILookup
Constructors
| Improve this Doc View SourceCsField(bool, bool, bool, SourceCodeType, IReadOnlyList<CsAttribute>, string, IReadOnlyList<string>, bool, string, string, string, string, CsSecurity, bool, bool, bool, string, CsType, string, ModelStore<ICsModel>, IReadOnlyList<ModelLoadException>)
Constructor for the CsField
Declaration
protected CsField(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 isReadOnly, bool isStatic, bool isConstant, string constantValue, CsType dataType, string sourceDocument, 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 | isReadOnly | Flag that determines if the model is read only. |
bool | isStatic | Flag that determines if the model is a static definition. |
bool | isConstant | Flag that determines if the field is a constant definition. |
string | constantValue | The value assigned to the field if it is a constant definition. |
CsType | dataType | The type definition for the field. |
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 SourceConstantValue
The value that was assigned to the constant. Will return as the string representation of the value.
Declaration
public string ConstantValue { get; }
Property Value
Type | Description |
---|---|
string |
DataType
The data type assigned to the field.
Declaration
public CsType DataType { get; }
Property Value
Type | Description |
---|---|
CsType |
IsConstant
Flag that determines if the field is a constant.
Declaration
public bool IsConstant { get; }
Property Value
Type | Description |
---|---|
bool |
IsReadOnly
Flag that determines if this field is set to readonly.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
bool |
IsStatic
Flag that determines if the field is set to be static.
Declaration
public bool IsStatic { get; }
Property Value
Type | Description |
---|---|
bool |
Explicit Interface Implementations
| Improve this Doc View SourceIDotNetField.DataType
The data type assigned to the field.
Declaration
IDotNetType IDotNetField.DataType { get; }
Returns
Type | Description |
---|---|
IDotNetType |