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

Search Results for

    Class CsType

    Data model that represents the definition of a type.

    Inheritance
    object
    CsModel
    CsType
    Implements
    ICsType
    ICsModel
    IModelStatus
    ICsGeneric
    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 CsType : CsModel, ICsType, ICsModel, IModelStatus, ICsGeneric

    Constructors

    CsType(bool, bool, bool, SourceCodeType, bool, bool, IReadOnlyList<CsGenericParameter>, IReadOnlyList<CsType>, string, string, bool, string, bool, bool, bool, bool, bool, bool, IReadOnlyList<int>, bool, bool, bool, bool, IReadOnlyList<CsTupleTypeParameter>, CsKnownLanguageType, string, ModelStore<ICsModel>, IReadOnlyList<ModelLoadException>)

    Constructor for the CsType

    Declaration
    protected CsType(bool isLoaded, bool hasErrors, bool loadedFromSource, SourceCodeType language, bool isGeneric, bool hasStrongTypesInGenerics, IReadOnlyList<CsGenericParameter> genericParameters, IReadOnlyList<CsType> genericTypes, string name, string ns, bool isWellKnownType, string valueTypeDefaultValue, bool isValueType, bool supportsDisposable, bool isInterface, bool isStructure, bool isClass, bool isArray, IReadOnlyList<int> arrayDimensions, bool isGenericPlaceHolder, bool isEnum, bool isDelegate, bool isTuple, IReadOnlyList<CsTupleTypeParameter> tupleTypes, CsKnownLanguageType wellKnownType, 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.

    bool isGeneric

    Flag that determines if the type is generic.

    bool hasStrongTypesInGenerics

    Flag that determines if the generics are strong types or placeholders.

    IReadOnlyList<CsGenericParameter> genericParameters

    Generic parameters assigned to the type.

    IReadOnlyList<CsType> genericTypes

    The type definitions for the generic implementation.

    string name

    The name of the type.

    string ns

    The namespace the type belongs to.

    bool isWellKnownType

    Is the type one of the well known types for the language.

    string valueTypeDefaultValue

    The default value if the type is a value type.

    bool isValueType

    Flag that determines if it is a value type.

    bool supportsDisposable

    Flag that determines if the type implements IDisposable interface.

    bool isInterface

    Flag that determines if the type is an interface definition.

    bool isStructure

    Flag that determines if the type is a structure definition.

    bool isClass

    Flag that determines if the type is a class definition.

    bool isArray

    Flag that determines if the type is also an array.

    IReadOnlyList<int> arrayDimensions

    The dimensions assigned to the array.

    bool isGenericPlaceHolder

    Flag that determines if the type is a generic place holder definition.

    bool isEnum

    Flag that determines if the type is an enumeration.

    bool isDelegate

    Flag that determines if the type is a delegate definition.

    bool isTuple

    Flag that determines if the type is a tuple.

    IReadOnlyList<CsTupleTypeParameter> tupleTypes

    The type information for each part of the tuple.

    CsKnownLanguageType wellKnownType

    The well known type from the language if it is well known.

    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

    ArrayDimensions

    Gets a list of the dimensions that are assigned to the array. This will contain more then one value if the array is a jagged array. This will be empty if the type is not an array.

    Declaration
    public IReadOnlyList<int> ArrayDimensions { get; }
    Property Value
    Type Description
    IReadOnlyList<int>

    GenericParameters

    List of the generic parameters assigned.

    Declaration
    public IReadOnlyList<CsGenericParameter> GenericParameters { get; }
    Property Value
    Type Description
    IReadOnlyList<CsGenericParameter>

    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>

    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

    IsArray

    Flag that determines if the type is an array of the target type.

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

    IsClass

    Flag that determines if the type is a class.

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

    IsDelegate

    Flag that determines if the type is a delegate.

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

    IsEnum

    Flag that determines if the type is a enumeration.

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

    IsGeneric

    Flag the determines if this item supports generics

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

    IsGenericPlaceHolder

    Flag that determines if the type is a generic place holder definition.

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

    IsInterface

    Flag that determines if the type is an interface.

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

    IsStructure

    Flag that determines if the type is a structure.

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

    IsTuple

    Flag that determine if the type is a Tuple

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

    IsValueType

    Flag that determines if the type is a value type.

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

    IsWellKnownType

    Flag that determines if the type is one of the well know data types of the language.

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

    Name

    The name of the type.

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

    Namespace

    The namespace the type belongs to.

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

    SupportsDisposable

    Flag that determines if the type supports the interface IDisposable.

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

    TupleTypes

    List of the types that are implemented in the Tuple. This will an empty list if the type is not a tuple.

    Declaration
    public IReadOnlyList<CsTupleTypeParameter> TupleTypes { get; }
    Property Value
    Type Description
    IReadOnlyList<CsTupleTypeParameter>

    ValueTypeDefaultValue

    The default value for well known value data types. This will be null if the value is not a well known value type.

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

    WellKnownType

    Enumeration of the target well known type this type represents.

    Declaration
    public CsKnownLanguageType WellKnownType { get; }
    Property Value
    Type Description
    CsKnownLanguageType

    Methods

    GetClassModel()

    Loads the full ICsClass model from the type definition.

    Declaration
    public CsClass GetClassModel()
    Returns
    Type Description
    CsClass

    Return the fully loaded model or an empty model if the type is not a class.

    GetClassModelData()

    Loads the full ICsClass model from the type definition.

    Declaration
    protected abstract CsClass GetClassModelData()
    Returns
    Type Description
    CsClass

    Return the fully loaded model or an empty model if the type is not a class.

    GetDelegateModel()

    Loads the full ICsDelegate model from the type definition.

    Declaration
    public CsDelegate GetDelegateModel()
    Returns
    Type Description
    CsDelegate

    Return the fully loaded model or an empty model if the type is not a delegate.

    GetDelegateModelData()

    Loads the full ICsDelegate model from the type definition.

    Declaration
    protected abstract CsDelegate GetDelegateModelData()
    Returns
    Type Description
    CsDelegate

    Return the fully loaded model or an empty model if the type is not a delegate.

    GetEnumModel()

    Loads the full ICsEnum model from the type definition.

    Declaration
    public CsEnum GetEnumModel()
    Returns
    Type Description
    CsEnum

    Return the fully loaded model or an empty model if the type is not an enumeration.

    GetEnumModelData()

    Logic to load the full model data for an enumeration.

    Declaration
    protected abstract CsEnum GetEnumModelData()
    Returns
    Type Description
    CsEnum

    Return the fully loaded model or an empty model if the type is not an enumeration.

    GetInterfaceModel()

    Loads the full CsInterface model from the type definition.

    Declaration
    public CsInterface GetInterfaceModel()
    Returns
    Type Description
    CsInterface

    Return the fully loaded model or an empty model if the type is not an interface.

    GetInterfaceModelData()

    Loads the full ICsInterface model from the type definition.

    Declaration
    protected abstract CsInterface GetInterfaceModelData()
    Returns
    Type Description
    CsInterface

    Return the fully loaded model or an empty model if the type is not an interface.

    GetStructureModel()

    Loads the full ICsStructure model from the type definition.

    Declaration
    public CsStructure GetStructureModel()
    Returns
    Type Description
    CsStructure

    Return the fully loaded model or an empty model if the type is not a structure.

    GetStructureModelData()

    Loads the full ICsStructure model from the type definition.

    Declaration
    protected abstract CsStructure GetStructureModelData()
    Returns
    Type Description
    CsStructure

    Return the fully loaded model or an empty model if the type is not a structure.

    Implements

    ICsType
    ICsModel
    IModelStatus
    ICsGeneric

    Extension Methods

    CsTypeExtensions.IsTaskOnlyType(CsType)
    CsTypeExtensions.IsTaskType(CsType)
    CsTypeExtensions.TaskReturnType(CsType)
    CsTypeExtensions.TypeInNamespace(CsType, string)
    CsTypeExtensions.TypeInTargetNamespace(CsType, string)
    GenereateCSharpTypeExtensions.GenerateCSharpArraySignature(CsType)
    GenereateCSharpTypeExtensions.GenerateCSharpDefaultValue(CsType)
    GenereateCSharpTypeExtensions.GenerateCSharpTupleSignature(CsType, NamespaceManager, List<MapNamespace>)
    GenereateCSharpTypeExtensions.GenerateCSharpTypeName(CsType, NamespaceManager, List<MapNamespace>)
    GenereateCSharpTypeExtensions.GenerateCSharpTypeNameRemoveNullableDefinition(CsType, NamespaceManager, List<MapNamespace>)
    GenereateCSharpTypeExtensions.GenerateCSharpValueSyntax(CsType, string)
    © CodeFactory, LLC. All rights reserved.