public PluginData <T> CreatePluginData <T>(T data, PluginDataId id = null)
     where T : Schema, new()
 {
     return(id == null
         ? new PluginData <T>(data)
     {
         ExecutionContext = _executionContext
     }
         : new PluginData <T>(data, id)
     {
         ExecutionContext = _executionContext
     });
 }
        /// <summary>
        /// Updates the Plugin-Plugin Dependency Graph
        /// </summary>
        private void UpdateDependencyGraph(PluginId destinationPluginId, PluginDataId dataId)
        {
            if (!_createdBy.ContainsKey(dataId))
            {
                throw new WorkflowEngineException("Cannot resolve data dependency");
            }
            var sourcePlugin = _createdBy[dataId];

            // Add edge only if it doesn't exist
            if (!_graph.TryGetEdge(sourcePlugin, destinationPluginId, out SEdge <PluginId> existingEdge))
            {
                _graph.AddVerticesAndEdge(new SEdge <PluginId>(sourcePlugin, destinationPluginId));
            }
        }
 public PluginDataList(IEnumerable <Schema> data, PluginDataId id, Version version)
 {
     Id      = id;
     Version = version;
     PopulateData(data);
 }
 public PluginDataList(IEnumerable <Schema> data, PluginDataId id)
 {
     Id = id;
     PopulateData(data);
 }
Esempio n. 5
0
 public PluginData(T data, PluginDataId id, Version version)
 {
     Id      = id;
     Data    = data;
     Version = version;
 }
Esempio n. 6
0
 public PluginData(T data, PluginDataId id) : this(data, id, GetSchemaVersion(data))
 {
 }
Esempio n. 7
0
 public PluginData <T> GetPluginOutputFromId <T>(PluginDataId id)
     where T : Schema, new()
 {
     return(_pluginOutputs[id] as PluginData <T>);
 }
 private void UpdateDataConsumer(PluginId pluginId, PluginDataId dataId)
 {
     _consumes.SafeAdd(pluginId, dataId);
     UpdateDependencyGraph(pluginId, dataId);
 }