static bool Manager_IsCreable(Type type) { if (!type.IsEntity() || !OperationLogic.HasConstructOperations(type)) { return(true); } return(Manager.HasConstructOperationsAllowedAndVisible(type)); }
public virtual ModifiableEntity ConstructCore(ConstructorContext ctx) { Func <ConstructorContext, ModifiableEntity> c = Constructors.TryGetC(ctx.Type); if (c != null) { ModifiableEntity result = c(ctx); if (result != null) { return(result); } } if (ctx.Type.IsEntity() && OperationLogic.HasConstructOperations(ctx.Type)) { return(OperationClient.Manager.Construct(ctx)); } return((ModifiableEntity)Activator.CreateInstance(ctx.Type, true)); }
public bool HasConstructOperations(Type entityType) { return(Return(MethodInfo.GetCurrentMethod(), () => OperationLogic.HasConstructOperations(entityType))); }