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

Search Results for

    Interface ICsAttribute

    Model definition for an attribute in a c# implementation.

    Inherited Members
    ICsModel.LoadedFromSource
    ICsModel.Language
    ICsModel.ModelType
    ICsModel.SourceDocument
    ICsModel.GetModel<T>(string)
    ICsModel.GetModel(string)
    IModelStatus.IsLoaded
    IModelStatus.HasErrors
    IModelStatus.GetErrors()
    IParent.Parent
    ISourceFiles.SourceFiles
    ISourceFiles.ModelSourceFile
    Namespace: CodeFactory.WinVs.Models.CSharp
    Assembly: CodeFactory.WinVs.dll
    Syntax
    public interface ICsAttribute : ICsModel, IModelStatus, IParent, ISourceFiles

    Properties

    HasParameters

    Flag that determines if the attribute has parameters

    Declaration
    bool HasParameters { get; }
    Property Value
    Type Description
    bool

    Parameters

    Enumeration of the parameters that are assigned to the attribute. This will be an empty list if HasParameters is false.

    Declaration
    IReadOnlyList<CsAttributeParameter> Parameters { get; }
    Property Value
    Type Description
    IReadOnlyList<CsAttributeParameter>

    Type

    The type information for the attribute itself.

    Declaration
    CsType Type { get; }
    Property Value
    Type Description
    CsType

    Methods

    AddAfterAsync(string)

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

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

    AddAfterAsync(string, string)

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

    Declaration
    [Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
    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.

    AddBeforeAsync(string)

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

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

    AddBeforeAsync(string, string)

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

    Declaration
    [Obsolete("No longer support will be removed in later edition, you no longer need to pass the source document.", false)]
    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.

    DeleteAsync()

    Deletes the definition of the attribute from the source document.

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

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

    Exceptions
    Type Condition
    DocumentException

    Error is raised when errors occur updating the source document.

    DeleteAsync(string)

    Deletes the definition of the attribute 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)]
    Task<CsSource> DeleteAsync(string sourceDocument)
    Parameters
    Type Name Description
    string sourceDocument

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

    Returns
    Type Description
    Task<CsSource>

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

    Exceptions
    Type Condition
    DocumentException

    Error is raised when errors occur updating the source document.

    GetSourceLocationAsync()

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

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

    The source location for the attribute.

    Exceptions
    Type Condition
    DocumentException

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

    GetSourceLocationAsync(string)

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

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

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

    Returns
    Type Description
    Task<ISourceLocation>

    The source location for the attribute.

    Exceptions
    Type Condition
    DocumentException

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

    ReplaceAsync(string)

    Replaces the current attribute with the provided source code.

    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.

    ReplaceAsync(string, string)

    Replaces the current attribute 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)]
    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.

    © CodeFactory, LLC. All rights reserved.