本文整理汇总了C#中IDSFDataObject类的典型用法代码示例。如果您正苦于以下问题:C# IDSFDataObject类的具体用法?C# IDSFDataObject怎么用?C# IDSFDataObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDSFDataObject类属于命名空间,在下文中一共展示了IDSFDataObject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: MockExecutionImpl
public System.Guid MockExecutionImpl(IEsbChannel esbChannel, IDSFDataObject dataObject, string inputs, string outputs, out DataList.Contract.ErrorResultTO tmpErrors)
{
tmpErrors = new ErrorResultTO();
tmpErrors.AddError("Something bad happened");
return Guid.Empty;
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:7,代码来源:MockDsfPluginActivity.cs
示例3: FetchParentInstanceId
private Guid FetchParentInstanceId(IDSFDataObject dataTransferObject)
{
Guid parentWorkflowInstanceId;
Guid.TryParse(dataTransferObject.ParentWorkflowInstanceId, out parentWorkflowInstanceId);
return parentWorkflowInstanceId;
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:8,代码来源:WorkflowApplicationFactory.cs
示例4: ExecuteConcreteAction
protected override IList<OutputTO> ExecuteConcreteAction(IDSFDataObject dataObject, out ErrorResultTO allErrors, int update)
{
IList<OutputTO> outputs = new List<OutputTO>();
allErrors = new ErrorResultTO();
var colItr = new WarewolfListIterator();
//get all the possible paths for all the string variables
var outputItr = new WarewolfIterator(dataObject.Environment.Eval(OutputPath, update));
colItr.AddVariableToIterateOn(outputItr);
var unameItr = new WarewolfIterator(dataObject.Environment.Eval(Username, update));
colItr.AddVariableToIterateOn(unameItr);
var passItr = new WarewolfIterator(dataObject.Environment.Eval(DecryptedPassword,update));
colItr.AddVariableToIterateOn(passItr);
var privateKeyItr = new WarewolfIterator(dataObject.Environment.Eval(PrivateKeyFile, update));
colItr.AddVariableToIterateOn(privateKeyItr);
if(dataObject.IsDebugMode())
{
AddDebugInputItem(new DebugEvalResult(OutputPath, "File or Folder", dataObject.Environment, update));
AddDebugInputItem(new DebugItemStaticDataParams(Overwrite.ToString(), "Overwrite"));
AddDebugInputItemUserNamePassword(dataObject.Environment, update);
if (!string.IsNullOrEmpty(PrivateKeyFile))
{
AddDebugInputItem(PrivateKeyFile, "Destination Private Key File", dataObject.Environment, update);
}
}
while(colItr.HasMoreData())
{
IActivityOperationsBroker broker = ActivityIOFactory.CreateOperationsBroker();
Dev2CRUDOperationTO opTo = new Dev2CRUDOperationTO(Overwrite);
try
{
IActivityIOPath dst = ActivityIOFactory.CreatePathFromString(colItr.FetchNextValue(outputItr),
colItr.FetchNextValue(unameItr),
colItr.FetchNextValue(passItr),
true, colItr.FetchNextValue(privateKeyItr));
IActivityIOOperationsEndPoint dstEndPoint = ActivityIOFactory.CreateOperationEndPointFromIOPath(dst);
string result = broker.Create(dstEndPoint, opTo, true);
outputs.Add(DataListFactory.CreateOutputTO(Result, result));
}
catch(Exception e)
{
outputs.Add(DataListFactory.CreateOutputTO(Result, "Failure"));
allErrors.AddError(e.Message);
break;
}
}
return outputs;
}
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:58,代码来源:DsfPathCreate.cs
示例5: ExecuteConcreteAction
protected override IList<OutputTO> ExecuteConcreteAction(IDSFDataObject dataObject, out ErrorResultTO allErrors, int update)
{
IList<OutputTO> outputs = new List<OutputTO>();
allErrors = new ErrorResultTO();
var colItr = new WarewolfListIterator();
//get all the possible paths for all the string variables
var inputItr = new WarewolfIterator(dataObject.Environment.Eval(InputPath, update));
colItr.AddVariableToIterateOn(inputItr);
var unameItr = new WarewolfIterator(dataObject.Environment.Eval(Username, update));
colItr.AddVariableToIterateOn(unameItr);
var passItr = new WarewolfIterator(dataObject.Environment.Eval(DecryptedPassword,update));
colItr.AddVariableToIterateOn(passItr);
var privateKeyItr = new WarewolfIterator(dataObject.Environment.Eval(PrivateKeyFile, update));
colItr.AddVariableToIterateOn(privateKeyItr);
outputs.Add(DataListFactory.CreateOutputTO(Result));
if(dataObject.IsDebugMode())
{
AddDebugInputItem(InputPath, "Input Path", dataObject.Environment, update);
AddDebugInputItemUserNamePassword(dataObject.Environment, update);
if(!string.IsNullOrEmpty(PrivateKeyFile))
{
AddDebugInputItem(PrivateKeyFile, "Private Key File", dataObject.Environment, update);
}
}
while(colItr.HasMoreData())
{
IActivityOperationsBroker broker = ActivityIOFactory.CreateOperationsBroker();
IActivityIOPath ioPath = ActivityIOFactory.CreatePathFromString(colItr.FetchNextValue(inputItr),
colItr.FetchNextValue(unameItr),
colItr.FetchNextValue(passItr),
true, colItr.FetchNextValue(privateKeyItr));
IActivityIOOperationsEndPoint endpoint = ActivityIOFactory.CreateOperationEndPointFromIOPath(ioPath);
try
{
string result = broker.Get(endpoint);
outputs[0].OutputStrings.Add(result);
}
catch(Exception e)
{
outputs[0].OutputStrings.Add(null);
allErrors.AddError(e.Message);
break;
}
}
return outputs;
}
开发者ID:Robin--,项目名称:Warewolf,代码行数:57,代码来源:DsfFileRead.cs
示例6: RemoteWorkflowExecutionContainer
public RemoteWorkflowExecutionContainer(ServiceAction sa, IDSFDataObject dataObj, IWorkspace workspace, IEsbChannel esbChannel, IResourceCatalog resourceCatalog)
: base(sa, dataObj, workspace, esbChannel)
{
if (resourceCatalog == null)
{
throw new ArgumentNullException("resourceCatalog");
}
_resourceCatalog = resourceCatalog;
}
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:9,代码来源:RemoteWorkflowExecutionContainer.cs
示例7: EsbExecutionContainer
protected EsbExecutionContainer(ServiceAction sa, IDSFDataObject dataObject, IWorkspace theWorkspace, IEsbChannel esbChannel, EsbExecuteRequest request)
{
ServiceAction = sa;
DataObject = dataObject;
TheWorkspace = theWorkspace;
EsbChannel = esbChannel;
Request = request;
DataObject.EsbChannel = EsbChannel;
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:9,代码来源:EsbExecutionContainer.cs
示例8: InitEntryPoint
/// <summary>
/// Inits the entry point.
/// </summary>
/// <param name="workflowActivity">The workflow activity.</param>
/// <param name="dataTransferObject">The data transfer object.</param>
/// <param name="executionExtensions">The execution extensions.</param>
/// <param name="instanceId">The instance id.</param>
/// <param name="workspace">The workspace.</param>
/// <param name="bookmarkName">Name of the bookmark.</param>
/// <returns></returns>
// ReSharper disable once UnusedParameter.Local // ignored as not sure how this method is invoked and what the knock on effect maybe
private WorkflowApplication InitEntryPoint(Activity workflowActivity, IDSFDataObject dataTransferObject, IEnumerable<object> executionExtensions, Guid instanceId, IWorkspace workspace, string bookmarkName)
{
dataTransferObject.WorkspaceID = workspace.ID;
Dictionary<string, object> inputarguments = new Dictionary<string, object>();
WorkflowApplication wfApp = null;
Guid parentInstanceID = FetchParentInstanceId(dataTransferObject);
if(parentInstanceID != Guid.Empty)
{
inputarguments.Add("ParentWorkflowInstanceId", parentInstanceID);
if(!string.IsNullOrEmpty(dataTransferObject.ParentServiceName))
{
inputarguments.Add("ParentServiceName", dataTransferObject.ParentServiceName);
}
}
// Set the old AmbientDatalist as the DataListID ;)
inputarguments.Add("AmbientDataList", new List<string> { dataTransferObject.DataListID.ToString() });
if((parentInstanceID != Guid.Empty && instanceId == Guid.Empty) || string.IsNullOrEmpty(bookmarkName))
{
wfApp = new WorkflowApplication(workflowActivity, inputarguments);
}
else
{
if(!string.IsNullOrEmpty(bookmarkName))
{
wfApp = new WorkflowApplication(workflowActivity);
}
}
if(wfApp != null)
{
wfApp.InstanceStore = InstanceStore;
if(executionExtensions != null)
{
executionExtensions.ToList().ForEach(exec => wfApp.Extensions.Add(exec));
}
// Force a save to the server ;)
IDataListCompiler compiler = DataListFactory.CreateDataListCompiler();
IDev2DataLanguageParser parser = DataListFactory.CreateLanguageParser();
wfApp.Extensions.Add(dataTransferObject);
wfApp.Extensions.Add(compiler);
wfApp.Extensions.Add(parser);
}
return wfApp;
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:68,代码来源:WorkflowApplicationFactory.cs
示例9: ExecuteConcreteAction
protected override IList<OutputTO> ExecuteConcreteAction(IDSFDataObject dataObject, out ErrorResultTO allErrors)
{
IList<OutputTO> outputs = new List<OutputTO>();
allErrors = new ErrorResultTO();
var colItr = new WarewolfListIterator();
//get all the possible paths for all the string variables
var inputItr = new WarewolfIterator(dataObject.Environment.Eval(InputPath));
colItr.AddVariableToIterateOn(inputItr);
var unameItr = new WarewolfIterator(dataObject.Environment.Eval(Username));
colItr.AddVariableToIterateOn(unameItr);
var passItr = new WarewolfIterator(dataObject.Environment.Eval(Password));
colItr.AddVariableToIterateOn(passItr);
outputs.Add(DataListFactory.CreateOutputTO(Result));
if(dataObject.IsDebugMode())
{
AddDebugInputItem(InputPath, "Input Path", dataObject.Environment);
AddDebugInputItemUserNamePassword(dataObject.Environment);
}
while(colItr.HasMoreData())
{
IActivityOperationsBroker broker = ActivityIOFactory.CreateOperationsBroker();
try
{
IActivityIOPath dst = ActivityIOFactory.CreatePathFromString(colItr.FetchNextValue(inputItr),
colItr.FetchNextValue(unameItr),
colItr.FetchNextValue(passItr),
true);
IActivityIOOperationsEndPoint dstEndPoint = ActivityIOFactory.CreateOperationEndPointFromIOPath(dst);
string result = broker.Delete(dstEndPoint);
outputs[0].OutputStrings.Add(result);
}
catch(Exception e)
{
outputs.Add(DataListFactory.CreateOutputTO(Result, "Failure"));
//outputs[0].OutputStrings.Add(null);
allErrors.AddError(e.Message);
break;
}
}
return outputs;
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:56,代码来源:DsfPathDelete.cs
示例10: ExecutionImpl
protected override Guid ExecutionImpl(IEsbChannel esbChannel, IDSFDataObject dataObject, string inputs, string outputs, out ErrorResultTO tmpErrors, int update)
{
_errorsTo = new ErrorResultTO();
var pluginServiceExecution = GetNewPluginServiceExecution(dataObject);
pluginServiceExecution.InstanceInputDefinitions = inputs;
pluginServiceExecution.InstanceOutputDefintions = outputs;
tmpErrors = new ErrorResultTO();
tmpErrors.MergeErrors(_errorsTo);
var result = ExecutePluginService(pluginServiceExecution, update);
tmpErrors.MergeErrors(_errorsTo);
return result;
}
开发者ID:Robin--,项目名称:Warewolf,代码行数:12,代码来源:DsfPluginActivity.cs
示例11: ExecutionImpl
protected override Guid ExecutionImpl(IEsbChannel esbChannel, IDSFDataObject dataObject, string inputs, string outputs, out ErrorResultTO tmpErrors)
{
tmpErrors = new ErrorResultTO();
var webserviceExecution = GetNewWebserviceExecution(dataObject);
if(webserviceExecution != null && !tmpErrors.HasErrors())
{
webserviceExecution.InstanceOutputDefintions = outputs; // set the output mapping for the instance ;)
webserviceExecution.InstanceInputDefinitions = inputs;
ErrorResultTO invokeErrors;
var result = webserviceExecution.Execute(out invokeErrors);
dataObject.Environment.AddError(invokeErrors.MakeDataListReady());
return result;
}
return Guid.NewGuid();
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:17,代码来源:DsfWebserviceActivity.cs
示例12: InternalServiceContainer
public InternalServiceContainer(ServiceAction sa, IDSFDataObject dataObj, IWorkspace theWorkspace, IEsbChannel esbChannel, EsbExecuteRequest request)
: base(sa, dataObj, theWorkspace, esbChannel, request)
{
var dataListTO = new DataListTO(sa.DataListSpecification.ToString());
if(request.Args == null)
{
request.Args = new Dictionary<string, StringBuilder>();
foreach(var input in dataListTO.Inputs)
{
var warewolfEvalResult = dataObj.Environment.Eval(DataListUtil.AddBracketsToValueIfNotExist(input),0,false);
if(warewolfEvalResult.IsWarewolfAtomResult)
{
var scalarResult = warewolfEvalResult as WarewolfDataEvaluationCommon.WarewolfEvalResult.WarewolfAtomResult;
if(scalarResult != null && !scalarResult.Item.IsNothing)
{
request.Args.Add(input, new StringBuilder(scalarResult.Item.ToString()));
}
}
}
}
}
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:21,代码来源:InternalServiceContainer.cs
示例13: ExecutionImpl
protected override Guid ExecutionImpl(IEsbChannel esbChannel, IDSFDataObject dataObject, string inputs, string outputs, out ErrorResultTO tmpErrors)
{
_errorsTo = new ErrorResultTO();
var compiler = DataListFactory.CreateDataListCompiler();
ErrorResultTO invokeErrors;
esbChannel.CorrectDataList(dataObject, dataObject.WorkspaceID, out invokeErrors, compiler);
dataObject.DataListID = compiler.Shape(dataObject.DataListID, enDev2ArgumentType.Input, inputs, out invokeErrors);
_errorsTo.MergeErrors(invokeErrors);
_errorsTo.MergeErrors(invokeErrors);
var pluginServiceExecution = GetNewPluginServiceExecution(dataObject);
pluginServiceExecution.InstanceInputDefinitions = inputs;
pluginServiceExecution.InstanceOutputDefintions = outputs;
tmpErrors = new ErrorResultTO();
tmpErrors.MergeErrors(_errorsTo);
var result = ExecutePluginService(pluginServiceExecution);
tmpErrors.MergeErrors(_errorsTo);
return result;
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:21,代码来源:DsfPluginActivity.cs
示例14: TryConvert
static void TryConvert(IDSFDataObject dataObject, XmlNodeList children, List<string> inputDefs, int update, int level = 0)
{
try
{
// spin through each element in the XML
foreach (XmlNode c in children)
{
if(c.Name != GlobalConstants.NaughtyTextNode)
{
if(level > 0)
{
var c1 = c;
var scalars = inputDefs.Where(definition => definition == c1.Name);
var recSets = inputDefs.Where(definition => DataListUtil.ExtractRecordsetNameFromValue(definition) == c1.Name);
var scalarDefs = scalars as string[] ?? scalars.ToArray();
var recSetDefs = recSets as string[] ?? recSets.ToArray();
if(recSetDefs.Length != 0)
{
var nl = c.ChildNodes;
foreach(XmlNode subc in nl)
{
foreach(var definition in recSetDefs)
{
if(DataListUtil.IsValueRecordset(definition))
{
if(DataListUtil.ExtractFieldNameFromValue(definition) == subc.Name)
{
var recSetAppend = DataListUtil.ReplaceRecordsetIndexWithBlank(definition);
var a = subc.InnerXml;
a = RemoveXMLPrefix(a);
dataObject.Environment.AssignWithFrame(new AssignValue(recSetAppend, a),update);
}
}
}
}
}
if(scalarDefs.Length != 0)
{
// fetch recordset index
// process recordset
var a = c.InnerXml;
a = RemoveXMLPrefix(a);
dataObject.Environment.Assign(DataListUtil.AddBracketsToValueIfNotExist(c.Name), a,update);
}
}
else
{
if(level == 0)
{
TryConvert(dataObject, c.ChildNodes, inputDefs, update, ++level);
}
}
}
}
}
finally
{
dataObject.Environment.CommitAssign();
}
}
开发者ID:Robin--,项目名称:Warewolf,代码行数:61,代码来源:ExecutionEnvironmentUtils.cs
示例15: InvokeWorkflow
/// <summary>
/// Invokes the workflow.
/// </summary>
/// <param name="workflowActivity">The workflow activity.</param>
/// <param name="dataTransferObject">The data transfer object.</param>
/// <param name="executionExtensions">The execution extensions.</param>
/// <param name="instanceId">The instance id.</param>
/// <param name="workspace">The workspace.</param>
/// <param name="bookmarkName">Name of the bookmark.</param>
/// <param name="errors">The errors.</param>
/// <returns></returns>
public IDSFDataObject InvokeWorkflow(Activity workflowActivity, IDSFDataObject dataTransferObject, IList<object> executionExtensions, Guid instanceId, IWorkspace workspace, string bookmarkName, out ErrorResultTO errors)
{
return InvokeWorkflowImpl(workflowActivity, dataTransferObject, executionExtensions, instanceId, workspace, bookmarkName, dataTransferObject.IsDebug, out errors);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:16,代码来源:WorkflowApplicationFactory.cs
示例16: OnPersistableIdle
private PersistableIdleAction OnPersistableIdle(WorkflowApplicationIdleEventArgs args)
{
_result = args.GetInstanceExtensions<IDSFDataObject>().ToList().First();
_waitHandle.Set();
return PersistableIdleAction.Unload;
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:6,代码来源:WorkflowApplicationFactory.cs
示例17: OnCompleted
private void OnCompleted(WorkflowApplicationCompletedEventArgs args)
{
_result = args.GetInstanceExtensions<IDSFDataObject>().ToList().First();
IDictionary<string, object> outputs = args.Outputs;
try
{
if(!_isDebug)
{
// Travis.Frisinger : 19.10.2012 - Duplicated Recordset Data Bug 6038
object parentId;
outputs.TryGetValue("ParentWorkflowInstanceId", out parentId);
parentId = _result.ParentWorkflowInstanceId;
object parentServiceName;
outputs.TryGetValue("ParentServiceName", out parentServiceName);
var parentServiceNameStr = string.IsNullOrEmpty(_result.ParentServiceName) ? string.Empty : _result.ParentServiceName;
if(!string.IsNullOrEmpty(parentServiceNameStr) && Guid.TryParse(parentId.ToString(), out _parentWorkflowInstanceID))
{
if(_parentWorkflowInstanceID != _currentInstanceID)
{
// BUG 7850 - TWR - 2013.03.11 - ResourceCatalog refactor
var services = ResourceCatalog.Instance.GetDynamicObjects<DynamicServiceObjectBase>(_workspace.ID, parentServiceNameStr);
if(services != null && services.Count > 0)
{
var service = services[0] as DynamicService;
if(service != null)
{
_currentInstanceID = _parentWorkflowInstanceID;
var actionSet = service.Actions;
if(_result.WorkflowResumeable)
{
var serviceAction = actionSet.First();
PooledServiceActivity wfActivity = serviceAction.PopActivity();
try
{
ErrorResultTO invokeErrors;
_result = _owner.InvokeWorkflow(wfActivity.Value, _result, _executionExtensions, _parentWorkflowInstanceID, _workspace, "dsfResumption", out invokeErrors);
// attach any execution errors
if(AllErrors != null)
{
AllErrors.MergeErrors(invokeErrors);
}
}
finally
{
serviceAction.PushActivity(wfActivity);
}
}
}
}
}
}
}
}
catch(Exception ex)
{
Dev2Logger.Log.Error(ex);
ExecutionStatusCallbackDispatcher.Instance.Post(_result.ExecutionCallbackID, ExecutionStatusCallbackMessageType.ErrorCallback);
}
finally
{
try
{
if(_waitHandle != null) _waitHandle.Set();
ExecutableServiceRepository.Instance.Remove(this);
if(DataTransferObject != null)
{
DataTransferObject.NumberOfSteps = _previousNumberOfSteps;
}
}
catch(Exception e)
{
// Best effort ;)
Dev2Logger.Log.Error(e);
}
}
// force a throw to kill the engine ;)
if(args.TerminationException != null)
{
_instance.Terminate("Force Terminate", new TimeSpan(0, 0, 1, 0));
}
// Not compatable with run.Dispose()
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:98,代码来源:WorkflowApplicationFactory.cs
示例18: Resume
public void Resume(IDSFDataObject dataObject)
{
var instanceID = dataObject.WorkflowInstanceId;
var bookmarkName = dataObject.CurrentBookmarkName;
var existingDlid = dataObject.DataListID;
_instance.Load(instanceID);
_instance.ResumeBookmark(bookmarkName, existingDlid);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:8,代码来源:WorkflowApplicationFactory.cs
示例19: DatabaseServiceContainer
public DatabaseServiceContainer(ServiceAction sa, IDSFDataObject dataObj, IWorkspace workspace, IEsbChannel esbChannel)
: base(sa, dataObj, workspace, esbChannel)
{
_databaseServiceExecution = new DatabaseServiceExecution(dataObj);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:5,代码来源:DatabaseServiceContainer.cs
示例20: Execute
public abstract IExecutionEnvironment Execute(IDSFDataObject inputs,IDev2Activity activity);
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:1,代码来源:EsbExecutionContainer.cs
注:本文中的IDSFDataObject类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论