Search Results for

    Show / Hide Table of Contents

    Class CustomTypeHelper

    Custom Type-Helper to extend ViewModels with dynamic properties

    Inheritance
    System.Object
    CustomTypeHelper
    ExtendableViewModelBase
    Implements
    System.Reflection.ICustomTypeProvider
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Simplic.UI.MVC
    Assembly: Simplic.UI.dll
    Syntax
    public class CustomTypeHelper : ICustomTypeProvider

    Constructors

    | Improve this Doc View Source

    CustomTypeHelper()

    Initialize new instance

    Declaration
    public CustomTypeHelper()

    Properties

    | Improve this Doc View Source

    CustomPropertyValues

    Gets all custom property values

    Declaration
    protected Dictionary<string, object> CustomPropertyValues { get; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>
    | Improve this Doc View Source

    TypePropertiesMap

    Gets a list of custom type properties

    Declaration
    public static IDictionary<Type, IList<CustomTypeHelper.CustomPropertyInfoHelper>> TypePropertiesMap { get; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.Type, System.Collections.Generic.IList<CustomTypeHelper.CustomPropertyInfoHelper>>

    Methods

    | Improve this Doc View Source

    AddProperty(String)

    Declaration
    public void AddProperty(string name)
    Parameters
    Type Name Description
    System.String name
    | Improve this Doc View Source

    AddProperty(String, Type)

    Declaration
    public void AddProperty(string name, Type propertyType)
    Parameters
    Type Name Description
    System.String name
    System.Type propertyType
    | Improve this Doc View Source

    AddProperty(String, Type, List<Attribute>)

    Declaration
    public void AddProperty(string name, Type propertyType, List<Attribute> attributes)
    Parameters
    Type Name Description
    System.String name
    System.Type propertyType
    System.Collections.Generic.List<System.Attribute> attributes
    | Improve this Doc View Source

    CheckIfCustomPropertyExists(String)

    Checks whether the custom property exists

    Declaration
    protected bool CheckIfCustomPropertyExists(string name)
    Parameters
    Type Name Description
    System.String name

    Name of the property

    Returns
    Type Description
    System.Boolean

    True of the property exists

    | Improve this Doc View Source

    CheckIfNameExists(String)

    Checkts whether a property exists

    Declaration
    protected bool CheckIfNameExists(string name)
    Parameters
    Type Name Description
    System.String name

    Name of the property

    Returns
    Type Description
    System.Boolean

    Returns true of the property exists, else false

    | Improve this Doc View Source

    GetCustomType()

    Get the custom created type

    Declaration
    public Type GetCustomType()
    Returns
    Type Description
    System.Type

    Type instance

    | Improve this Doc View Source

    GetProperties()

    Get all property infos of the custom type

    Declaration
    public PropertyInfo[] GetProperties()
    Returns
    Type Description
    System.Reflection.PropertyInfo[]

    Property information

    | Improve this Doc View Source

    GetPropertyValue(String)

    Get a value from a custom property

    Declaration
    public object GetPropertyValue(string propertyName)
    Parameters
    Type Name Description
    System.String propertyName

    Property name

    Returns
    Type Description
    System.Object

    Value if the property exists, else an exception will be thrown

    | Improve this Doc View Source

    SetPropertyValue(String, Object)

    Set the value for an existing property. Throws an exception if the property does not exists

    Declaration
    public void SetPropertyValue(string propertyName, object value)
    Parameters
    Type Name Description
    System.String propertyName

    Property name

    System.Object value

    Value to set

    Implements

    System.Reflection.ICustomTypeProvider
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx