CodeFactory Platform CodeFactory Platform
CodeFactory Platform CodeFactory Platform
CodeFactory

Search Results for

    Class CsContainer

    Data model that implements the base implement for all models that support members.

    Inheritance
    object
    CsModel
    CsContainer
    CsContainerWithNestedContainers
    CsRecord
    CsRecordStructure
    Implements
    ICsContainer
    ICsModel
    ICsAttributes
    ICsGeneric
    IDotNetContainer
    IDotNetModel
    IModelStatus
    ISourceFiles
    IDotNetAttributes
    IDocumentation
    IDotNetGeneric
    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 CsContainer : CsModel, ICsContainer, ICsModel, ICsAttributes, ICsGeneric, IDotNetContainer, IDotNetModel, IModelStatus, ISourceFiles, IDotNetAttributes, IDocumentation, IDotNetGeneric, ILookup, IParent, IParent

    Constructors

    | Improve this Doc View Source

    CsContainer(bool, bool, bool, SourceCodeType, CsModelType, IReadOnlyList<CsAttribute>, bool, bool, IReadOnlyList<CsGenericParameter>, IReadOnlyList<CsType>, string, IReadOnlyList<string>, bool, string, string, string, string, string, CsContainerType, CsSecurity, IReadOnlyList<CsInterface>, IReadOnlyList<CsMember>, string, ModelStore<ICsModel>, IReadOnlyList<ModelLoadException>)

    Constructor for the CsContainer

    Declaration
    protected CsContainer(bool isLoaded, bool hasErrors, bool loadedFromSource, SourceCodeType language, CsModelType modelType, IReadOnlyList<CsAttribute> attributes, bool isGeneric, bool hasStrongTypesInGenerics, IReadOnlyList<CsGenericParameter> genericParameters, IReadOnlyList<CsType> genericTypes, string modelSourceFile, IReadOnlyList<string> sourceFiles, bool hasDocumentation, string documentation, string lookupPath, string name, string ns, string parentPath, CsContainerType containerType, CsSecurity security, IReadOnlyList<CsInterface> inheritedInterfaces, IReadOnlyList<CsMember> members, 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.

    CsModelType modelType

    The type of code model created.

    IReadOnlyList<CsAttribute> attributes

    List of the attributes assigned to this model.

    bool isGeneric

    Flag that determines if the container is a generic definition.

    bool hasStrongTypesInGenerics

    Flag that determines if the generics use strong type definitions.

    IReadOnlyList<CsGenericParameter> genericParameters

    Generic parameters assigned to the container.

    IReadOnlyList<CsType> genericTypes

    Target types for the generic parameters assigned to the container.

    string modelSourceFile

    The source file the model was loaded from.

    IReadOnlyList<string> sourceFiles

    List of the fully qualified paths to the source code files this model 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 ns

    The namespace the container belongs to.

    string parentPath

    The fully qualified lookup path for the parent model to this one.

    CsContainerType containerType

    The type of container this model represents.

    CsSecurity security

    The security scope assigned to this model.

    IReadOnlyList<CsInterface> inheritedInterfaces

    The interfaces that are inherited by this container.

    IReadOnlyList<CsMember> members

    The members assigned to this container.

    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 Source

    Attributes

    The attributes assigned to this item. If the HasAttributes is false this will be an empty list.

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

    ContainerType

    The type of container model that has been implemented.

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

    Documentation

    Documentation that has been assigned to this model.

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

    Events

    Enumeration of the events assigned to this container. If HasEvents is false this will be null.

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

    GenericParameters

    List of the generic parameters assigned.

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

    GenericTypes

    List of the strong types that are implemented for each generic parameter. This will be an empty List when there is no generic types implemented.

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

    HasAttributes

    Flag that determines if attributes are assigned.

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

    HasDocumentation

    Flag that determines if the model has code level documentation assigned to it.

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

    HasStrongTypesInGenerics

    Flag that determines if the generics implementation has strong types passed in to the generics implementation.

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

    InheritedInterfaces

    List of the interfaces that are inherited by this container.

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

    IsGeneric

    Flag the determines if this item supports generics

    Declaration
    public bool IsGeneric { get; }
    Property Value
    Type Description
    bool
    | 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

    Members

    List of the members that are implemented in this container.

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

    Methods

    List of the methods that are implemented in this container.

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

    ModelSourceFile

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

    Name

    The name of the container.

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

    Namespace

    The namespace the container objects belongs to.

    Declaration
    public string Namespace { get; }
    Property Value
    Type Description
    string
    | 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

    Properties

    List of the properties that are implemented in this container.

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

    Security

    The security scope assigned to the container.

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

    SourceFiles

    The source file or files in which the model was loaded from. This will be an empty enumeration if the source models were loaded from metadata only.

    Declaration
    public IReadOnlyList<string> SourceFiles { get; }
    Property Value
    Type Description
    IReadOnlyList<string>

    Methods

    | Improve this Doc View Source

    AddAfterAsync(string, string)

    Adds the source code directly after the definition of the ICsContainerin the target document.

    Declaration
    [Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
    public abstract Task<CsSource> AddAfterAsync(string sourceDocument, string sourceCode)
    Parameters
    Type Name Description
    string sourceDocument

    The fully qualified path to the source code document to be updated.

    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

    AddAfterAsync(string)

    Adds the source code directly after the definition of the ICsContainerin the target document.

    Declaration
    public abstract Task<CsSource> AddAfterAsync(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

    AddAfterDocsAsync(string)

    Adds the supplied source code directly after the documentation.

    Declaration
    public abstract Task<CsSource> AddAfterDocsAsync(string sourceCode)
    Parameters
    Type Name Description
    string sourceCode

    The target syntax to be added to the document.

    Returns
    Type Description
    Task<CsSource>

    Updated CsSource model with the injected source code.

    | Improve this Doc View Source

    AddBeforeAsync(string, bool)

    Declaration
    public abstract Task<CsSource> AddBeforeAsync(string sourceCode, bool ignoreLeadingModelsAndDocs)
    Parameters
    Type Name Description
    string sourceCode
    bool ignoreLeadingModelsAndDocs
    Returns
    Type Description
    Task<CsSource>
    | Improve this Doc View Source

    AddBeforeAsync(string, string)

    Adds the source code directly before the definition of the ICsContainerin the target document.

    Declaration
    [Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
    public abstract Task<CsSource> AddBeforeAsync(string sourceDocument, string sourceCode)
    Parameters
    Type Name Description
    string sourceDocument

    The fully qualified path to the source code document to be updated.

    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

    AddBeforeAsync(string)

    Adds the source code directly before the definition of the ICsContainerin the target document.

    Declaration
    public abstract Task<CsSource> AddBeforeAsync(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

    AddBeforeDocsAsync(string)

    Adds the supplied source code directly before the documentation.

    Declaration
    public abstract Task<CsSource> AddBeforeDocsAsync(string sourceCode)
    Parameters
    Type Name Description
    string sourceCode

    The target syntax to be added to the document.

    Returns
    Type Description
    Task<CsSource>

    Updated CsSource model with the injected source code.

    | Improve this Doc View Source

    AddToBeginningAsync(string, string)

    Adds the source code inside of the container at the beginning of where members are defined in the container.

    Declaration
    [Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
    public abstract Task<CsSource> AddToBeginningAsync(string sourceDocument, string sourceCode)
    Parameters
    Type Name Description
    string sourceDocument

    The fully qualified path to the source document to be updated.

    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.

    | Improve this Doc View Source

    AddToBeginningAsync(string)

    Adds the source code inside of the container at the beginning of where members are defined in the container.

    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.

    | Improve this Doc View Source

    AddToEndAsync(string, string)

    Adds the source code inside of the container at the end of where members are defined in the container.

    Declaration
    [Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
    public abstract Task<CsSource> AddToEndAsync(string sourceDocument, string sourceCode)
    Parameters
    Type Name Description
    string sourceDocument

    The fully qualified path to the source document to be updated.

    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.

    | Improve this Doc View Source

    AddToEndAsync(string)

    Adds the source code inside of the container at the end of where members are defined in the container.

    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.

    | Improve this Doc View Source

    DeleteAsync()

    Deletes the definition of the container from the source document.

    Declaration
    public abstract Task<CsSource> DeleteAsync()
    Returns
    Type Description
    Task<CsSource>

    A newly loaded copy of the ICsSource model after the container 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

    DeleteAsync(string)

    Deletes the definition of the container from the source document.

    Declaration
    [Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
    public abstract Task<CsSource> DeleteAsync(string sourceDocument)
    Parameters
    Type Name Description
    string sourceDocument

    The source document that the container is to be removed from.

    Returns
    Type Description
    Task<CsSource>

    A newly loaded copy of the ICsSource model after the container 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

    DeleteDocsAsync()

    Deletes the documentation from the target supporting code artifact.

    Declaration
    public abstract Task<CsSource> DeleteDocsAsync()
    Returns
    Type Description
    Task<CsSource>

    Updated CsSource model with the documentation removed.

    | Improve this Doc View Source

    GetBodySourceLocationAsync()

    Gets the starting and ending locations of the body located in the container.

    Declaration
    public abstract Task<ISourceLocation> GetBodySourceLocationAsync()
    Returns
    Type Description
    Task<ISourceLocation>

    The source location in the container.

    Exceptions
    Type Condition
    DocumentException

    Raised when an error occurs getting the location from the document.

    | Improve this Doc View Source

    GetBodySourceLocationAsync(string)

    Gets the starting and ending locations of the body located in the container.

    Declaration
    [Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
    public abstract Task<ISourceLocation> GetBodySourceLocationAsync(string sourceDocument)
    Parameters
    Type Name Description
    string sourceDocument

    The fully qualified path to the document that has the container defined in.

    Returns
    Type Description
    Task<ISourceLocation>

    The source location in the container.

    Exceptions
    Type Condition
    DocumentException

    Raised when an error occurs getting the location from the document.

    | Improve this Doc View Source

    GetBodySyntaxAsync()

    The source code syntax that is stored in the body of the container model. This will be null if the container was not loaded from source code.

    Declaration
    public abstract Task<string> GetBodySyntaxAsync()
    Returns
    Type Description
    Task<string>
    | Improve this Doc View Source

    GetSourceLocationAsync()

    Gets the starting and ending locations within the document where the container is located.

    Declaration
    public abstract Task<ISourceLocation> GetSourceLocationAsync()
    Returns
    Type Description
    Task<ISourceLocation>

    The source location for the container.

    Exceptions
    Type Condition
    DocumentException

    Raised when an error occurs getting the location from the document.

    | Improve this Doc View Source

    GetSourceLocationAsync(string)

    Gets the starting and ending locations within the document where the container is located.

    Declaration
    [Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
    public abstract Task<ISourceLocation> GetSourceLocationAsync(string sourceDocument)
    Parameters
    Type Name Description
    string sourceDocument

    The fully qualified path to the document that has the container defined in.

    Returns
    Type Description
    Task<ISourceLocation>

    The source location for the container.

    Exceptions
    Type Condition
    DocumentException

    Raised when an error occurs getting the location from the document.

    | Improve this Doc View Source

    ReplaceAsync(string, string)

    Replaces the current container with the provided source code.

    Declaration
    [Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
    public abstract Task<CsSource> ReplaceAsync(string sourceDocument, string sourceCode)
    Parameters
    Type Name Description
    string sourceDocument

    The fully qualified path to the source code document to be updated.

    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.

    | Improve this Doc View Source

    ReplaceAsync(string)

    Replaces the current container with the provided source code.

    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.

    | Improve this Doc View Source

    ReplaceDocsAsync(string)

    Replaces the supplied source code directly this the documentation.

    Declaration
    public abstract Task<CsSource> ReplaceDocsAsync(string sourceCode)
    Parameters
    Type Name Description
    string sourceCode

    The target syntax to be added to the document.

    Returns
    Type Description
    Task<CsSource>

    Updated CsSource model with the injected source code.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IDotNetAttributes.Attributes

    The attributes assigned to this item. If the HasAttributes is false this will be an empty list.

    Declaration
    IReadOnlyList<IDotNetAttribute> IDotNetAttributes.Attributes { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetAttribute>
    | Improve this Doc View Source

    IDotNetContainer.ContainerType

    The type of container model that has been implemented.

    Declaration
    DotNetContainerType IDotNetContainer.ContainerType { get; }
    Returns
    Type Description
    DotNetContainerType
    | Improve this Doc View Source

    IDotNetContainer.Events

    Enumeration of the events assigned to this container. If HasEvents is false this will be null.

    Declaration
    IReadOnlyList<IDotNetEvent> IDotNetContainer.Events { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetEvent>
    | Improve this Doc View Source

    IDotNetContainer.InheritedInterfaces

    List of the interfaces that are inherited by this container.

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

    IDotNetContainer.Members

    List of the members that are implemented in this container.

    Declaration
    IReadOnlyList<IDotNetMember> IDotNetContainer.Members { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetMember>
    | Improve this Doc View Source

    IDotNetContainer.Methods

    List of the methods that are implemented in this container.

    Declaration
    IReadOnlyList<IDotNetMethod> IDotNetContainer.Methods { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetMethod>
    | Improve this Doc View Source

    IDotNetContainer.Properties

    List of the properties that are implemented in this container.

    Declaration
    IReadOnlyList<IDotNetProperty> IDotNetContainer.Properties { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetProperty>
    | Improve this Doc View Source

    IDotNetContainer.Security

    The security scope assigned to the container.

    Declaration
    DotNetSecurity IDotNetContainer.Security { get; }
    Returns
    Type Description
    DotNetSecurity
    | Improve this Doc View Source

    IDotNetGeneric.GenericParameters

    List of the generic parameters assigned.

    Declaration
    IReadOnlyList<IDotNetGenericParameter> IDotNetGeneric.GenericParameters { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetGenericParameter>
    | Improve this Doc View Source

    IDotNetGeneric.GenericTypes

    Enumeration of the strong types that are implemented for each generic parameter. This will be an empty list when there is no generic types implemented.

    Declaration
    IReadOnlyList<IDotNetType> IDotNetGeneric.GenericTypes { get; }
    Returns
    Type Description
    IReadOnlyList<IDotNetType>
    | 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

    ICsContainer
    ICsModel
    ICsAttributes
    ICsGeneric
    IDotNetContainer
    IDotNetModel
    IModelStatus
    ISourceFiles
    IDotNetAttributes
    IDocumentation
    IDotNetGeneric
    ILookup
    IParent
    IParent

    Extension Methods

    CsContainerExtensions.FormatCSharpComparisonMembers(CsContainer, MemberComparisonType)
    CSharpModelExtensions.ToModel<T>(CsModel)
    DocumentationExtensions.CSharpFormatXmlDocumentationEnumerator(IDocumentation)
    DotNetContainerExtensions.FormatCSharpComparisonMembers(IDotNetContainer, MemberComparisonType)
    © CodeFactory, LLC. All rights reserved.