示例#1
0
        static bool Manager_IsCreable(Type type)
        {
            if (!type.IsEntity() || !OperationLogic.HasConstructOperations(type))
            {
                return(true);
            }

            return(Manager.HasConstructOperationsAllowedAndVisible(type));
        }
示例#2
0
        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));
        }
示例#3
0
 public bool HasConstructOperations(Type entityType)
 {
     return(Return(MethodInfo.GetCurrentMethod(),
                   () => OperationLogic.HasConstructOperations(entityType)));
 }