Search Results for

    Show / Hide Table of Contents

    Interface IEntityDescriptorFactory

    Namespace: LemonEdge.Core.Descriptors
    Assembly: API.dll
    Syntax
    public interface IEntityDescriptorFactory

    Properties

    Options

    Accessor for the configuration options for the factory.

    Declaration
    EntityDescriptorFactoryOptions Options { get; set; }
    Property Value
    Type Description
    EntityDescriptorFactoryOptions

    Methods

    GetComplexTypeDescriptor(Type)

    Returns the ComplexTypeDescriptor for the specified instance of a complex type

    Declaration
    ComplexTypeDescriptor GetComplexTypeDescriptor(Type type)
    Parameters
    Type Name Description
    System.Type type

    The complex type.

    Returns
    Type Description
    ComplexTypeDescriptor

    The ComplexTypeDescriptor for the specified instance of a complex type

    GetComplexTypes()

    Returns a ComplexTypeDescriptor for every complex type found in the system including through custom objects and addins

    Declaration
    IEnumerable<ComplexTypeDescriptor> GetComplexTypes()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<ComplexTypeDescriptor>

    A ComplexTypeDescriptor for every complex type found in the system including through custom objects and addins

    GetDescriptor(IBaseEntity)

    Returns the EntityDescriptor for the specified instance of an entity

    Declaration
    EntityDescriptor GetDescriptor(IBaseEntity item)
    Parameters
    Type Name Description
    IBaseEntity item

    The instance of an entity to return its associated EntityDescriptor for

    Returns
    Type Description
    EntityDescriptor

    The EntityDescriptor for the specified instance of an entity

    GetDescriptor(QueryableExecuter)

    Returns the EntityDescriptor for the type being queried in an QueryableExecuter

    Declaration
    EntityDescriptor GetDescriptor(QueryableExecuter queryItems)
    Parameters
    Type Name Description
    QueryableExecuter queryItems

    A query

    Returns
    Type Description
    EntityDescriptor

    The EntityDescriptor for the type being queried in an QueryableExecuter

    GetDescriptor(Guid, Guid)

    Returns the EntityDescriptor for the specified type, and specified sub type (if looking for a replicated EntityDescriptor)

    Declaration
    EntityDescriptor GetDescriptor(Guid id, Guid forType = default(Guid))
    Parameters
    Type Name Description
    System.Guid id

    The unique global id of an entity type

    System.Guid forType

    The unique global id of an entity that is the sub type for the EntityDescriptor - used when looking for a replicated EntityDescriptor

    Returns
    Type Description
    EntityDescriptor

    GetDescriptor(String)

    Returns the EntityDescriptor for the specified uniqueKey of an EntityDescriptor

    Declaration
    EntityDescriptor GetDescriptor(string uniqueKey)
    Parameters
    Type Name Description
    System.String uniqueKey

    The UniqueKey of an EntityDescriptor

    Returns
    Type Description
    EntityDescriptor

    The EntityDescriptor for the specified uniqueKey of an EntityDescriptor

    GetDescriptor(Type, Guid)

    Returns the EntityDescriptor for the specified type, and specified sub type (if looking for a replicated EntityDescriptor)

    Declaration
    EntityDescriptor GetDescriptor(Type t, Guid forType = default(Guid))
    Parameters
    Type Name Description
    System.Type t

    The type of an entity (either its interface or class type)

    System.Guid forType

    The unique global id of an entity that is the sub type for the EntityDescriptor - used when looking for a replicated EntityDescriptor

    Returns
    Type Description
    EntityDescriptor

    GetDescriptor<T>(Guid)

    Returns the EntityDescriptor for the specified type, and specified sub type (if looking for a replicated EntityDescriptor).

    Declaration
    EntityDescriptor GetDescriptor<T>(Guid forType = default(Guid))
    Parameters
    Type Name Description
    System.Guid forType

    The unique global id of an entity that is the sub type for the EntityDescriptor - used when looking for a replicated EntityDescriptor.

    Returns
    Type Description
    EntityDescriptor
    Type Parameters
    Name Description
    T

    The type of an entity (either its interface or class type).

    GetDescriptors()

    Returns an EntityDescriptor for each entity within the system including those defined through custom objects and addins

    This also includes replicated EntityDescriptors - in other words the complete set of all EntityDescriptors available within the system

    Declaration
    IEnumerable<EntityDescriptor> GetDescriptors()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<EntityDescriptor>

    An EntityDescriptor for each entity within the system including those defined through custom objects and addins

    GetDescriptors(IEnumerable<Assembly>)

    Returns all EntityDescriptor restricted to just those for a particular database.

    This is required for task services and other processes that connect to multiple databases at once

    Declaration
    IEnumerable<EntityDescriptor> GetDescriptors(IEnumerable<Assembly> assemblies)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<System.Reflection.Assembly> assemblies

    The database custom assemblies.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<EntityDescriptor>

    All EntityDescriptor restricted to just those for a particular database.

    GetKnownTypes()

    Returns all known entity types and enum types within all loaded EntityDescriptors in the system

    Used for serialization

    Declaration
    IEnumerable<Type> GetKnownTypes()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.Type>

    All known entity types and enum types within all loaded EntityDescriptors in the system

    IsPartOfSpecificAssembly(Guid, IEnumerable<Assembly>)

    It's possible using custom objects (which dynamically create dlls) that we have the same object design (using the same typeids -> sharedkey) in two databases we can only have one entity descriptor for that typeid, so we store any other assemblies that reference the same typeid then here we can say that if specific dlls are requested we can return that typeid if it is part of our stored assemblies

    Declaration
    bool IsPartOfSpecificAssembly(Guid typeID, IEnumerable<Assembly> customAssemblies)
    Parameters
    Type Name Description
    System.Guid typeID

    The unique global type of an entity that needs to be checked if it is defined in the list of assemblies

    System.Collections.Generic.IEnumerable<System.Reflection.Assembly> customAssemblies

    A list of assemblies to check if the specified entity type is defined within it

    Returns
    Type Description
    System.Boolean

    True if the unique global id of the entity descriptor is defined as an entity in the specified list of assemblies

    ReplicateEntityDescriptor(EntityDescriptor, EntityDescriptor)

    Declaration
    EntityDescriptor ReplicateEntityDescriptor(EntityDescriptor replicatingDescriptor, EntityDescriptor mainDescriptor)
    Parameters
    Type Name Description
    EntityDescriptor replicatingDescriptor
    EntityDescriptor mainDescriptor
    Returns
    Type Description
    EntityDescriptor

    Extension Methods

    EntityDescriptorFactoryExtensions.GetTypeDistinctDescriptors(IEntityDescriptorFactory)
    EntityDescriptorFactoryExtensions.GetAllDependantEntities(IEntityDescriptorFactory, EntityDescriptor)
    EntityDescriptorFactoryExtensions.GetDirectDependantEntities(IEntityDescriptorFactory, EntityDescriptor, Boolean)
    EntityDescriptorFactoryExtensions.GetDescriptorsInSaveOrder(IEntityDescriptorFactory, IEnumerable<EntityDescriptor>)
    EntityDescriptorFactoryExtensions.GetItemsInTypeSaveOrder(IEntityDescriptorFactory, IReadOnlyCollection<IBaseEntity>)
    EntityDescriptorFactoryExtensions.GetItemsInTypeReverseSaveOrder(IEntityDescriptorFactory, IReadOnlyCollection<IBaseEntity>)
    EntityDescriptorFactoryExtensions.GetCachedDescriptors(IEntityDescriptorFactory)
    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)
    In This Article
    Back to top © LemonEdge Technology. All rights reserved.