Пример #1
0
        public EntityPackTS?Construct([Required, FromBody] ConstructOperationRequest request)
        {
            var entityType = TypeLogic.GetType(request.type);

            var entity = OperationLogic.ServiceConstruct(entityType, request.GetOperationSymbol(entityType), request.args);

            return(entity == null ? null : SignumServer.GetEntityPack(entity));
        }
Пример #2
0
        public EntityPackTS Construct(ConstructOperationRequest request)
        {
            var type = TypeLogic.GetType(request.type);

            var entity = OperationLogic.ServiceConstruct(type, request.operarionSymbol, request.args);

            return(entity == null ? null : SignumServer.GetEntityPack(entity));
        }
Пример #3
0
        protected internal virtual Entity Construct(ConstructorContext ctx)
        {
            OperationInfo constructor = GetConstructor(ctx);

            var settings = GetSettings <ConstructorOperationSettingsBase>(ctx.Type, constructor.OperationSymbol);

            var result = settings != null && settings.HasConstructor ? settings.OnConstructor(newConstructorOperationContext.GetInvoker(ctx.Type)(constructor, ctx, settings)) :
                         OperationLogic.ServiceConstruct(ctx.Type, constructor.OperationSymbol);

            ctx.Controller.ViewData[ViewDataKeys.WriteEntityState] = true;

            return(result);
        }
Пример #4
0
 public Entity Construct(Type type, OperationSymbol operationSymbol, params object[] args)
 {
     return(Return(MethodInfo.GetCurrentMethod(), operationSymbol.ToString(),
                   () => OperationLogic.ServiceConstruct(type, operationSymbol, args)));
 }