本文整理汇总了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;
}
示例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();
}
}
示例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);
}