本文整理汇总了C#中DataObject.Set方法的典型用法代码示例。如果您正苦于以下问题:C# DataObject.Set方法的具体用法?C# DataObject.Set怎么用?C# DataObject.Set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataObject
的用法示例。
在下文中一共展示了DataObject.Set方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetProcessDataSource
/// <summary>
/// Return process data for data binding
/// </summary>
/// <returns></returns>
protected internal IDataObject GetProcessDataSource()
{
DataObject dob = new DataObject(GetProcessVariablesContainer());
dob.Set("_processDef", null, Definition);
dob.Set("_instance", null, this);
return dob;
}
示例2: GetTaskOutputData
/// <summary>
/// Return task output data
/// </summary>
/// <returns></returns>
public virtual IDataObject GetTaskOutputData()
{
StructDef sd = ProcessTask.GetTaskOutputDataSchema();
DataObject dob = new DataObject(sd);
IDataObject src = GetTaskVariablesContainer();
foreach (VariableDef vd in this.ProcessTask.TaskVariables)
{
if (vd.VariableDir == VariableDef.Dir.InOut || vd.VariableDir == VariableDef.Dir.Out)
{
object obj = src[vd.Name];
dob.Set(vd.Name, null, obj);
}
}
dob.Validate();
return dob;
}
示例3: GetProcessOutputData
/// <summary>
/// Return process instance output data
/// Can be called only if Status == Finished
/// </summary>
/// <returns></returns>
public DataObject GetProcessOutputData()
{
if (Status != ProcessStatus.Finished) throw new ApplicationException("Process must be finished to get output data");
if (!_activated) throw new ApplicationException("Not activated");
StructDef sd = this.Definition.GetProcessOutputDataSchema();
DataObject dob = new DataObject(sd);
IDataObject src = this.GetProcessVariablesContainer();
foreach (VariableDef vd in Definition.ProcessVariables)
{
if (vd.VariableDir == VariableDef.Dir.InOut || vd.VariableDir == VariableDef.Dir.Out)
{
object obj = src[vd.Name];
dob.Set(vd.Name, null, obj);
}
}
dob.Validate();
return dob;
}