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

Search Results for

    Class CsModelStore

    Model storage class used to store c# code factory models, to be used to pass data to factories.

    Inheritance
    object
    CsModelStore
    Inherited Members
    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 class CsModelStore

    Constructors

    CsModelStore()

    Creates a new instance of the CsModelStore and initializes the store for data to be added.

    Declaration
    public CsModelStore()

    CsModelStore(ICsModel)

    Creates a new instance of the CsModelStore and sets a single model in the store.

    Declaration
    public CsModelStore(ICsModel model)
    Parameters
    Type Name Description
    ICsModel model

    The model to be added to the store.

    CsModelStore(Dictionary<string, IEnumerable<ICsModel>>)

    Creates a new instance of the CsModelStore and loads all the data for all the categories.

    Declaration
    public CsModelStore(Dictionary<string, IEnumerable<ICsModel>> allModels)
    Parameters
    Type Name Description
    Dictionary<string, IEnumerable<ICsModel>> allModels

    All the model data to be added to the store.

    Properties

    Model

    The single ICsModel that is provided for the T4 Template.

    Declaration
    public ICsModel Model { get; }
    Property Value
    Type Description
    ICsModel

    Methods

    AddModels(string, IEnumerable<ICsModel>)

    Adds many C# models to the store by category.

    Declaration
    public void AddModels(string category, IEnumerable<ICsModel> models)
    Parameters
    Type Name Description
    string category

    Name used to keep track of the models that are stored together.

    IEnumerable<ICsModel> models

    The models stored by the target category.

    Models(string)

    Gets the models from a target category.

    Declaration
    public IEnumerable<ICsModel> Models(string category)
    Parameters
    Type Name Description
    string category

    Category to get models for.

    Returns
    Type Description
    IEnumerable<ICsModel>

    Returns a enumeration of the models. If no models were found then an empty enumeration is returned.

    SetModel(ICsModel)

    Sets the single model to be shared with a factory.

    Declaration
    public void SetModel(ICsModel model)
    Parameters
    Type Name Description
    ICsModel model

    Target model to be used in a factory.

    © CodeFactory, LLC. All rights reserved.