public static IEnumerable <T> GenerateEntityReferenceList <T>(IEntityDataManager entityDataManager, IEnumerable <Guid> ids) where T : IEntityReference { List <T> result = new List <T>(); foreach (Guid id in ids) { string entityType = entityDataManager.GetEntityType(id); Type type = Utility.GetMatchingEntityReferenceType <T>(entityType); T r = (T)Activator.CreateInstance(type); r.Id = id; result.Add(r); } return(result); }
public static object GenerateEntityReferenceListGeneric(Type genericTypeParameter, IEntityDataManager entityDataManager, IEnumerable <Guid> ids) { return(Gnosis.Reflection.Utility.InvokeGenericStaticMethod(typeof(Utility), "GenerateEntityReferenceList", genericTypeParameter, entityDataManager, ids)); }
public static object GenerateEntityReferenceListGeneric(EntityField ef, IEntityDataManager entityDataManager, IEnumerable <Guid> ids) { return(GenerateEntityReferenceListGeneric(ef.PropertyFirstGenericTypeArgument, entityDataManager, ids)); }
public static IEnumerable <T> GenerateEntityList <T>(IEntityDataManager entityDataManager, IEnumerable <Guid> ids, IEnumerable <EntityField> fields) where T : IEntity { return(entityDataManager.LoadEntities <T>(ids, fields, new EntityField[] {})); }
protected void SetEntityDataManager(IEntityDataManager entityDataManager) { this.entityDataManager = entityDataManager; }
public EntityManager(IEntityDataManager entityDataManager) { SetEntityDataManager(entityDataManager); }