CodeFactory Platform CodeFactory Platform
CodeFactory Platform CodeFactory Platform
CodeFactory

Search Results for

    Class CsSource

    Data model that represents source code.

    Inheritance
    object
    CsModel
    CsSource
    Implements
    ICsSource
    ICsModel
    IDotNetSource
    IDotNetModel
    IModelStatus
    ILookup
    IParent
    IParent
    Inherited Members
    CsModel.LocalModelErrors
    CsModel.ModelStore
    CsModel.IsLoaded
    CsModel.HasErrors
    CsModel.GetErrors()
    CsModel.LoadedFromSource
    CsModel.Language
    CsModel.ModelType
    CsModel.SourceDocument
    CsModel.IDotNetModel.ModelType
    CsModel.LookupModel(string)
    CsModel.GetModel<T>(string)
    CsModel.GetModel(string)
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: CodeFactory.DotNet.CSharp
    Assembly: CodeFactory.DotNet.dll
    Syntax
    public abstract class CsSource : CsModel, ICsSource, ICsModel, IDotNetSource, IDotNetModel, IModelStatus, ILookup, IParent, IParent

    Constructors

    | Improve this Doc View Source

    CsSource(bool, bool, bool, SourceCodeType, string, string, string, IReadOnlyList<CsUsingStatement>, IReadOnlyList<CsInterface>, IReadOnlyList<CsClass>, IReadOnlyList<CsStructure>, IReadOnlyList<CsRecord>, IReadOnlyList<CsRecordStructure>, IReadOnlyList<CsDelegate>, IReadOnlyList<CsEnum>, IReadOnlyList<CsNamespace>, bool, string, ModelStore<ICsModel>, IReadOnlyList<ModelLoadException>)

    Constructor for the CsSource

    Declaration
    protected CsSource(bool isLoaded, bool hasErrors, bool loadedFromSource, SourceCodeType language, string lookupPath, string sourceDocument, string parentPath, IReadOnlyList<CsUsingStatement> namespaceReferences, IReadOnlyList<CsInterface> interfaces, IReadOnlyList<CsClass> classes, IReadOnlyList<CsStructure> structures, IReadOnlyList<CsRecord> records, IReadOnlyList<CsRecordStructure> recordStructures, IReadOnlyList<CsDelegate> delegates, IReadOnlyList<CsEnum> enums, IReadOnlyList<CsNamespace> namespaces, bool hostedInProject, string projectName, 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.

    string lookupPath

    The fully qualified name of the model to be used with the model store.

    string sourceDocument

    The fully qualified path to the source document that loaded this model.

    string parentPath

    The fully qualified path to the parent model of this model.

    IReadOnlyList<CsUsingStatement> namespaceReferences

    The namespace reference in the source.

    IReadOnlyList<CsInterface> interfaces

    The interfaces that are define in this source.

    IReadOnlyList<CsClass> classes

    The classes that are defined in this source.

    IReadOnlyList<CsStructure> structures

    The structures that are defined in this source.

    IReadOnlyList<CsRecord> records

    The records that are defined in this source.

    IReadOnlyList<CsRecordStructure> recordStructures

    The record structures that are defined in this source.

    IReadOnlyList<CsDelegate> delegates

    The delegates that are defined in this source.

    IReadOnlyList<CsEnum> enums

    The enumerations defined in this source.

    IReadOnlyList<CsNamespace> namespaces

    The namespaces that are defined in this source.

    bool hostedInProject
    string projectName
    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 Source

    Classes

    The classes that were defined in the source.

    Declaration
    public IReadOnlyList<CsClass> Classes { get; }
    Property Value
    Type Description
    IReadOnlyList<CsClass>
    | Improve this Doc View Source

    Delegates

    The delegates that were defined in the source.

    Declaration
    public IReadOnlyList<CsDelegate> Delegates { get; }
    Property Value
    Type Description
    IReadOnlyList<CsDelegate>
    | Improve this Doc View Source

    Enums

    The enumerations that were defined in the source.

    Declaration
    public IReadOnlyList<CsEnum> Enums { get; }
    Property Value
    Type Description
    IReadOnlyList<CsEnum>
    | Improve this Doc View Source

    HostedInProject

    Flag that determines if the source code was hosted in a project.

    Declaration
    public bool HostedInProject { get; }
    Property Value
    Type Description
    bool
    | Improve this Doc View Source

    Interfaces

    The interfaces that were defined in the source.

    Declaration
    public IReadOnlyList<CsInterface> Interfaces { get; }
    Property Value
    Type Description
    IReadOnlyList<CsInterface>
    | Improve this Doc View Source

    LookupPath

    The fully qualified path for this model that can be used when searching the source for the model.

    Declaration
    public string LookupPath { get; }
    Property Value
    Type Description
    string
    | Improve this Doc View Source

    NamespaceReferences

    The namespaces that are used as references to access other libraries not hosted in the source document.

    Declaration
    public IReadOnlyList<CsUsingStatement> NamespaceReferences { get; }
    Property Value
    Type Description
    IReadOnlyList<CsUsingStatement>
    | Improve this Doc View Source

    Namespaces

    The namespaces that were defined in the source.

    Declaration
    public IReadOnlyList<CsNamespace> Namespaces { get; }
    Property Value
    Type Description
    IReadOnlyList<CsNamespace>
    | Improve this Doc View Source

    Parent

    The parent to the current model. This will return null if there is no parent for this model, or the parent could not be located.

    Declaration
    public CsModel Parent { get; }
    Property Value
    Type Description
    CsModel
    | Improve this Doc View Source

    ProjectName

    The name of the project the source is hosted in. This will be null if this source is not hosted in a project.

    Declaration
    public string ProjectName { get; }
    Property Value
    Type Description
    string
    | Improve this Doc View Source

    Records

    The records that were defined in the source.

    Declaration
    public IReadOnlyList<CsRecord> Records { get; }
    Property Value
    Type Description
    IReadOnlyList<CsRecord>
    | Improve this Doc View Source

    RecordStructures

    The record structures that were defined in the source.

    Declaration
    public IReadOnlyList<CsRecordStructure> RecordStructures { get; }
    Property Value
    Type Description
    IReadOnlyList<CsRecordStructure>
    | Improve this Doc View Source

    Structures

    The structures that were defined in the source.

    Declaration
    public IReadOnlyList<CsStructure> Structures { get; }
    Property Value
    Type Description
    IReadOnlyList<CsStructure>

    Methods

    | Improve this Doc View Source

    AddToBeginningAsync(string)

    Adds the source code to the beginning of the ICsSource model.

    Declaration
    public abstract 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.

    | Improve this Doc View Source

    AddToEndAsync(string)

    Adds the source code the end of the ICsSource model.

    Declaration
    public abstract 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.

    | Improve this Doc View Source

    DeleteAsync()

    Deletes the content from the ICsSource model.

    Declaration
    public abstract 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.

    | Improve this Doc View Source

    ReplaceAsync(string)

    Replaces the content of the ICsSource model.

    Declaration
    public abstract 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.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IDotNetSource.Classes

    The classes that were defined in the source.

    Declaration
    IReadOnlyList<IDotNetClass> IDotNetSource.Classes { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetClass>
    | Improve this Doc View Source

    IDotNetSource.Delegates

    The delegates that were defined in the source.

    Declaration
    IReadOnlyList<IDotNetDelegate> IDotNetSource.Delegates { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetDelegate>
    | Improve this Doc View Source

    IDotNetSource.Enums

    The enumerations that were defined in the source.

    Declaration
    IReadOnlyList<IDotNetEnum> IDotNetSource.Enums { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetEnum>
    | Improve this Doc View Source

    IDotNetSource.Interfaces

    The interfaces that were defined in the source.

    Declaration
    IReadOnlyList<IDotNetInterface> IDotNetSource.Interfaces { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetInterface>
    | Improve this Doc View Source

    IDotNetSource.NamespaceReferences

    The namespaces that are used as references to access other libraries not hosted in the source document.

    Declaration
    IReadOnlyList<IDotNetNamespaceReference> IDotNetSource.NamespaceReferences { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetNamespaceReference>
    | Improve this Doc View Source

    IDotNetSource.Namespaces

    The namespaces that were defined in the source.

    Declaration
    IReadOnlyList<IDotNetNamespace> IDotNetSource.Namespaces { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetNamespace>
    | Improve this Doc View Source

    IDotNetSource.Records

    The records that were defined in the source.

    Declaration
    IReadOnlyList<IDotNetRecord> IDotNetSource.Records { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetRecord>
    | Improve this Doc View Source

    IDotNetSource.RecordStructures

    The record structures that were defined in the source.

    Declaration
    IReadOnlyList<IDotNetRecordStructure> IDotNetSource.RecordStructures { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetRecordStructure>
    | Improve this Doc View Source

    IDotNetSource.Structures

    The structures that were defined in the source.

    Declaration
    IReadOnlyList<IDotNetStructure> IDotNetSource.Structures { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetStructure>
    | Improve this Doc View Source

    IParent.Parent

    The parent to the current model. This will return null if there is no parent for this model, or the parent could not be located.

    Declaration
    IDotNetModel IParent.Parent { get; }
    Returns
    Type Description
    IDotNetModel

    Implements

    ICsSource
    ICsModel
    IDotNetSource
    IDotNetModel
    IModelStatus
    ILookup
    IParent
    IParent

    Extension Methods

    CSharpModelExtensions.ToModel<T>(CsModel)
    CsSourceExtensions.AddMissingNamespaces(CsSource, IEnumerable<CsMember>, string)
    CsSourceExtensions.AddUsingStatementAsync(CsSource, string, string)
    CsSourceExtensions.HasUsingStatement(CsSource, string, string)
    CsSourceExtensions.LoadNamespaceManager(CsSource, string)
    CsMemberExtensions.SourceMissingInterfaceMembers(ICsSource)
    © CodeFactory, LLC. All rights reserved.