CodeFactory for Windows CodeFactory for Windows
CodeFactory for Windows CodeFactory for Windows
CodeFactory

Search Results for

    Class CsSource

    Data model that represents source code.

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

    Constructors

    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

    Classes

    The classes that were defined in the source.

    Declaration
    public IReadOnlyList<CsClass> Classes { get; }
    Property Value
    Type Description
    IReadOnlyList<CsClass>

    Delegates

    The delegates that were defined in the source.

    Declaration
    public IReadOnlyList<CsDelegate> Delegates { get; }
    Property Value
    Type Description
    IReadOnlyList<CsDelegate>

    Enums

    The enumerations that were defined in the source.

    Declaration
    public IReadOnlyList<CsEnum> Enums { get; }
    Property Value
    Type Description
    IReadOnlyList<CsEnum>

    HostedInProject

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

    Declaration
    public bool HostedInProject { get; }
    Property Value
    Type Description
    bool

    Interfaces

    The interfaces that were defined in the source.

    Declaration
    public IReadOnlyList<CsInterface> Interfaces { get; }
    Property Value
    Type Description
    IReadOnlyList<CsInterface>

    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

    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>

    Namespaces

    The namespaces that were defined in the source.

    Declaration
    public IReadOnlyList<CsNamespace> Namespaces { get; }
    Property Value
    Type Description
    IReadOnlyList<CsNamespace>

    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

    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

    RecordStructures

    The record structures that were defined in the source.

    Declaration
    public IReadOnlyList<CsRecordStructure> RecordStructures { get; }
    Property Value
    Type Description
    IReadOnlyList<CsRecordStructure>

    Records

    The records that were defined in the source.

    Declaration
    public IReadOnlyList<CsRecord> Records { get; }
    Property Value
    Type Description
    IReadOnlyList<CsRecord>

    Structures

    The structures that were defined in the source.

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

    Methods

    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.

    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.

    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.

    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.

    Implements

    ICsSource
    ICsModel
    IModelStatus
    IParent
    ILookup

    Extension Methods

    CsSourceExtensions.AddMissingNamespaces(CsSource, IEnumerable<CsMember>, string)
    CsSourceExtensions.AddUsingStatementAsync(CsSource, string, string)
    CsSourceExtensions.HasUsingStatement(CsSource, string, string)
    © CodeFactory, LLC. All rights reserved.