Пример #1
0
        public static TOutput GetBatchMethodOutput <TInterface, TOutput, TSingleInputItem, TSingleOutputItem>(BatchFacadeMethodInfo <TInterface, TOutput, TSingleInputItem, TSingleOutputItem> facade)
            where TInterface : class, IDataProvider
            where TOutput : class, IBasicOutput <TSingleOutputItem[]>, new()
        {
            try
            {
                StandardReturType   standardRetur;
                SubMethodRunState[] subMethodRunStates;

                standardRetur = Validate <TOutput, TSingleOutputItem[]>(facade);
                if (!StandardReturType.IsSucceeded(standardRetur))
                {
                    return(new TOutput()
                    {
                        StandardRetur = standardRetur
                    });
                }

                standardRetur = Initialize <TOutput, TSingleOutputItem[]>(facade, out subMethodRunStates);
                if (!StandardReturType.IsSucceeded(standardRetur))
                {
                    return(new TOutput()
                    {
                        StandardRetur = standardRetur
                    });
                }

                return(facade.Run(subMethodRunStates));
            }
            catch (Exception ex)
            {
                Local.Admin.LogException(ex);
                return(new TOutput()
                {
                    StandardRetur = StandardReturType.UnspecifiedError()
                });
            }
        }
Пример #2
0
 public static TOutput GetBatchMethodOutput <TInterface, TOutput, TSingleInputItem, TSingleOutputItem>(BatchFacadeMethodInfo <TInterface, TOutput, TSingleInputItem, TSingleOutputItem> facadeMethod)
     where TInterface : class, IDataProvider
     where TOutput : class, IBasicOutput <TSingleOutputItem[]>, new()
 {
     return(CprBroker.Engine.Manager.GetBatchMethodOutput <TInterface, TOutput, TSingleInputItem, TSingleOutputItem>(facadeMethod));
 }