CodeFactory Platform CodeFactory Platform
CodeFactory Platform CodeFactory Platform
CodeFactory

Search Results for

    Class CsManualUsingStatement

    Manual data model class that captures a target namespace and potential alias. Will throw exceptions if any of the methods are called.

    Inheritance
    object
    CsManualUsingStatement
    Implements
    ICsUsingStatement
    IDotNetNamespaceReference
    ILookup
    ICsModel
    IDotNetModel
    IModelStatus
    IParent
    IParent
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: CodeFactory.Formatting.CSharp
    Assembly: CodeFactory.Formatting.CSharp.dll
    Syntax
    public class CsManualUsingStatement : ICsUsingStatement, IDotNetNamespaceReference, ILookup, ICsModel, IDotNetModel, IModelStatus, IParent, IParent

    Constructors

    | Improve this Doc View Source

    CsManualUsingStatement(string, string)

    Creates a instance of CsManualUsingStatement

    Declaration
    public CsManualUsingStatement(string nameSpace, string alais = null)
    Parameters
    Type Name Description
    string nameSpace

    Target namespace that is called in the using statement.

    string alais

    Optional the alais assigned to the referenced namespace.

    Properties

    | Improve this Doc View Source

    Alias

    The alias assigned to the namespace being imported. This will be null if the HasAlias is false.

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

    HasAlias

    Flag that determines if the namespace reference has an alias.

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

    HasErrors

    Flag that determines if this model or one of the children of this model has an error.

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

    IsLoaded

    Flag that determines if this model was able to load.

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

    Language

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

    LoadedFromSource

    Flag that determines if this model was loaded from source code or was loaded through reflects or symbol libraries. This will always be false since its a manual model.

    Declaration
    public bool LoadedFromSource { 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. This will not be populated on the manual model.

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

    ModelType

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

    Parent

    The parent to the current model. This will return null since it is a manual model.

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

    ReferenceNamespace

    The target namespace that is being imported into the sources scope.

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

    SourceDocument

    The fully qualified path to the document that was used to load the model from source. This will not be populated on the manual model.

    Declaration
    public string SourceDocument { get; }
    Property Value
    Type Description
    string

    Methods

    | Improve this Doc View Source

    AddAfterAsync(string, string)

    Adds the source code directly after the definition of the ICsUsingStatement in the target document.

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

    Remarks

    This will always throw a NotImplementedException since it is a manual model.

    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 ICsUsingStatement in the target document.

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

    Remarks

    This will always throw a NotImplementedException since it is a manual model.

    Exceptions
    Type Condition
    DocumentException

    Error is raised when errors occur updating the source document.

    | Improve this Doc View Source

    AddBeforeAsync(string, string)

    Adds the source code directly before the definition of the ICsUsingStatement in the target document.

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

    Remarks

    This will always throw a NotImplementedException since it is a manual model.

    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 ICsUsingStatement in the target document.

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

    Remarks

    This will always throw a NotImplementedException since it is a manual model.

    Exceptions
    Type Condition
    DocumentException

    Error is raised when errors occur updating the source document.

    | Improve this Doc View Source

    DeleteAsync()

    Deletes the definition of the using statement from the source document.

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

    A newly loaded copy of the ICsSource model after the using statement has been removed from the document.

    Remarks

    This will always throw a NotImplementedException since it is a manual model.

    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 using statement from the source document.

    Declaration
    public Task<CsSource> DeleteAsync(string sourceDocument)
    Parameters
    Type Name Description
    string sourceDocument

    The source document that the using statement is to be removed from.

    Returns
    Type Description
    Task<CsSource>

    A newly loaded copy of the ICsSource model after the using statement has been removed from the document.

    Remarks

    This will always throw a NotImplementedException since it is a manual model.

    Exceptions
    Type Condition
    DocumentException

    Error is raised when errors occur updating the source document.

    | Improve this Doc View Source

    GetErrors()

    Gets the ModelLoadException from the current model and all child models of this model.

    Declaration
    public IReadOnlyList<ModelLoadException> GetErrors()
    Returns
    Type Description
    IReadOnlyList<ModelLoadException>

    Returns a IReadOnlyList<T> of the ModelLoadException exceptions or an empty list if no exceptions exist.

    Remarks

    This will always throw a NotImplementedException since it is a manual model.

    | Improve this Doc View Source

    GetModel(string)

    Searchs for an existing C# model that has been loaded with the load of the source code.

    Declaration
    public CsModel GetModel(string lookupPath)
    Parameters
    Type Name Description
    string lookupPath

    The lookup path that is assigned to a loaded model.

    Returns
    Type Description
    CsModel

    Returns the model as the base CsModel type.

    Remarks

    This will always throw a NotImplementedException since it is a manual model.

    | Improve this Doc View Source

    GetSourceLocationAsync()

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

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

    The source location for the using statement.

    Remarks

    This will always throw a NotImplementedException since it is a manual model.

    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 using statement is located.

    Declaration
    public Task<ISourceLocation> GetSourceLocationAsync(string sourceDocument)
    Parameters
    Type Name Description
    string sourceDocument

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

    Returns
    Type Description
    Task<ISourceLocation>

    The source location for the using statement.

    Remarks

    This will always throw a NotImplementedException since it is a manual model.

    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 using statement with the provided source code.

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

    Remarks

    This will always throw a NotImplementedException since it is a manual model.

    Exceptions
    Type Condition
    DocumentException

    Error is raised when errors occur updating the source document.

    | Improve this Doc View Source

    ReplaceAsync(string)

    Replaces the current using statement with the provided source code.

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

    Remarks

    This will always throw a NotImplementedException since it is a manual model.

    Exceptions
    Type Condition
    DocumentException

    Error is raised when errors occur updating the source document.

    Explicit Interface Implementations

    | Improve this Doc View Source

    ICsModel.GetModel<T>(string)

    Searchs for an existing C# model that has been loaded with the load of the source code.

    Declaration
    T ICsModel.GetModel<T>(string lookupPath) where T : class, ICsModel
    Parameters
    Type Name Description
    string lookupPath

    The lookup path that is assigned to a loaded model.

    Returns
    Type Description
    T

    Returns the model as the identified type it will either return the instance or null if it is not found or not the correct type.

    Type Parameters
    Name Description
    T

    The target CsModel type to cast to before returning.

    Remarks

    This will always throw a NotImplementedException since it is a manual model.

    | Improve this Doc View Source

    IDotNetModel.ModelType

    The type of dot net model that was loaded.

    Declaration
    DotNetModelType IDotNetModel.ModelType { get; }
    Returns
    Type Description
    DotNetModelType
    | Improve this Doc View Source

    IParent.Parent

    The parent to the current model. This will be null since this is manual model.

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

    Implements

    ICsUsingStatement
    IDotNetNamespaceReference
    ILookup
    ICsModel
    IDotNetModel
    IModelStatus
    IParent
    IParent
    © CodeFactory, LLC. All rights reserved.