当前位置: 首页>>代码示例>>C#>>正文


C# ErrorResultTO.FetchErrors方法代码示例

本文整理汇总了C#中Dev2.DataList.Contract.ErrorResultTO.FetchErrors方法的典型用法代码示例。如果您正苦于以下问题:C# ErrorResultTO.FetchErrors方法的具体用法?C# ErrorResultTO.FetchErrors怎么用?C# ErrorResultTO.FetchErrors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dev2.DataList.Contract.ErrorResultTO的用法示例。


在下文中一共展示了ErrorResultTO.FetchErrors方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ExecutionImpl

        protected override Guid ExecutionImpl(IEsbChannel esbChannel, IDSFDataObject dataObject, string inputs, string outputs, out ErrorResultTO errors, int update)
        {
            var execErrors = new ErrorResultTO();

            errors = new ErrorResultTO();
            errors.MergeErrors(execErrors);

            var databaseServiceExecution = ServiceExecution as DatabaseServiceExecution;
            if(databaseServiceExecution != null)
            {
                databaseServiceExecution.InstanceInputDefinitions = inputs; // set the output mapping for the instance ;)
                databaseServiceExecution.InstanceOutputDefintions = outputs; // set the output mapping for the instance ;)
            }
            //ServiceExecution.DataObj = dataObject;
            var result = ServiceExecution.Execute(out execErrors, update);
            var fetchErrors = execErrors.FetchErrors();
            foreach(var error in fetchErrors)
            {
                dataObject.Environment.Errors.Add(error);
            }
            
            errors.MergeErrors(execErrors);

            // Adjust the remaining output mappings ;)
            return result;
        }
开发者ID:Robin--,项目名称:Warewolf,代码行数:26,代码来源:DsfDatabaseActivity.cs

示例2: MergeErrors

        /// <summary>
        /// Merges the errors.
        /// </summary>
        /// <param name="toMerge">To merge.</param>
        public void MergeErrors(ErrorResultTO toMerge)
        {
            if (toMerge != null && toMerge.HasErrors())
            {
                // Flipping Union does not appear to work
                foreach (string wtf in toMerge.FetchErrors())
                {
                    _errorList.Add(wtf);
                }

                toMerge.ClearErrors();
            }
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:17,代码来源:ErrorResultTO.cs

示例3: CreateListsOfIDataListItemModelToBindTo

        /// <summary>
        ///     Creates the list of data list item view model to bind to.
        /// </summary>
        /// <param name="errorString">The error string.</param>
        /// <returns></returns>
        public void CreateListsOfIDataListItemModelToBindTo(out string errorString)
        {
            errorString = string.Empty;
            IDataListCompiler compiler = DataListFactory.CreateDataListCompiler();
            if(!string.IsNullOrEmpty(Resource.DataList))
            {
                ErrorResultTO errors = new ErrorResultTO();
                try
                {
                    IBinaryDataList binarnyDl = CreateBinaryDataListFromXmlData(Resource.DataList, out errors);
                    if (!errors.HasErrors())
                    {
                        ConvertBinaryDataListToListOfIDataListItemModels(binarnyDl, out errorString);
                    }
                    else
                    {
                        string errorMessage = errors.FetchErrors().Aggregate(string.Empty, (current, error) => current + error);
                        throw new Exception(errorMessage);
                    }
                    if (binarnyDl != null)
                        compiler.ForceDeleteDataListByID(binarnyDl.UID);
                }
                catch(Exception)
                {
                    errors.AddError("Invalid variable list. Please insure that your variable list has valid entries");
                }
               

            }
            else
            {
                RecsetCollection.Clear();
                AddRecordSet();
                ScalarCollection.Clear();
            }

            BaseCollection = new OptomizedObservableCollection<DataListHeaderItemModel>();

            DataListHeaderItemModel varNode = DataListItemModelFactory.CreateDataListHeaderItem("Variable");
            if(ScalarCollection.Count == 0)
            {
                var dataListItemModel = DataListItemModelFactory.CreateDataListModel(string.Empty);
                ScalarCollection.Add(dataListItemModel);
            }
            varNode.Children = ScalarCollection;
            BaseCollection.Add(varNode);

            //AddRecordsetNamesIfMissing();

            DataListHeaderItemModel recordsetsNode = DataListItemModelFactory.CreateDataListHeaderItem("Recordset");
            if(RecsetCollection.Count == 0)
            {
                AddRecordSet();
            }
            recordsetsNode.Children = RecsetCollection;
            BaseCollection.Add(recordsetsNode);
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:62,代码来源:DataListViewModel.cs


注:本文中的Dev2.DataList.Contract.ErrorResultTO.FetchErrors方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。