Interface ICsSource
Source definition from a source that was written in C#.
Inherited Members
Namespace: CodeFactory.DotNet.CSharp
Assembly: CodeFactory.DotNet.dll
Syntax
public interface ICsSource : ICsModel, IDotNetSource, IDotNetModel, IModelStatus, ILookup, IParent, IParent
Properties
| Improve this Doc View SourceClasses
The classes that were defined in the source.
Declaration
IReadOnlyList<CsClass> Classes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<CsClass> |
Delegates
The delegates that were defined in the source.
Declaration
IReadOnlyList<CsDelegate> Delegates { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<CsDelegate> |
Enums
The enumerations that were defined in the source.
Declaration
IReadOnlyList<CsEnum> Enums { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<CsEnum> |
Interfaces
The interfaces that were defined in the source.
Declaration
IReadOnlyList<CsInterface> Interfaces { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<CsInterface> |
NamespaceReferences
The namespaces that are used as references to access other libraries not hosted in the source document.
Declaration
IReadOnlyList<CsUsingStatement> NamespaceReferences { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<CsUsingStatement> |
Namespaces
The namespaces that were defined in the source.
Declaration
IReadOnlyList<CsNamespace> Namespaces { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<CsNamespace> |
Records
The records that were defined in the source.
Declaration
IReadOnlyList<CsRecord> Records { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<CsRecord> |
RecordStructures
The record structures that were defined in the source.
Declaration
IReadOnlyList<CsRecordStructure> RecordStructures { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<CsRecordStructure> |
Structures
The structures that were defined in the source.
Declaration
IReadOnlyList<CsStructure> Structures { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<CsStructure> |
Methods
| Improve this Doc View SourceAddToBeginningAsync(string)
Adds the source code to the beginning of the ICsSource model.
Declaration
Task<CsSource> AddToBeginningAsync(string sourceCode)
Parameters
Type | Name | Description |
---|---|---|
string | sourceCode | The source code that is to be added to the document. |
Returns
Type | Description |
---|---|
Task<CsSource> | A newly loaded copy of the ICsSource model after the changes have been applied. |
Exceptions
Type | Condition |
---|---|
DocumentException | Error is raised when errors occur updating the source document. |
AddToEndAsync(string)
Adds the source code the end of the ICsSource model.
Declaration
Task<CsSource> AddToEndAsync(string sourceCode)
Parameters
Type | Name | Description |
---|---|---|
string | sourceCode | The source code that is to be added to the document. |
Returns
Type | Description |
---|---|
Task<CsSource> | A newly loaded copy of the ICsSource model after the changes have been applied. |
Exceptions
Type | Condition |
---|---|
DocumentException | Error is raised when errors occur updating the source document. |
DeleteAsync()
Deletes the content from the ICsSource model.
Declaration
Task<CsSource> DeleteAsync()
Returns
Type | Description |
---|---|
Task<CsSource> | A newly loaded copy of the ICsSource model after the delegate has been removed from the document. |
Exceptions
Type | Condition |
---|---|
DocumentException | Error is raised when errors occur updating the source document. |
ReplaceAsync(string)
Replaces the content of the ICsSource model.
Declaration
Task<CsSource> ReplaceAsync(string sourceCode)
Parameters
Type | Name | Description |
---|---|---|
string | sourceCode | The source code that is to be used to replace the original definition in the document. |
Returns
Type | Description |
---|---|
Task<CsSource> | A newly loaded copy of the ICsSource model after the changes have been applied. |
Exceptions
Type | Condition |
---|---|
DocumentException | Error is raised when errors occur updating the source document. |