Exemplo n.º 1
0
        private void CreateDefaultOutputActivity()
        {
            var factory = ActivityFactories.FirstOrDefault(f => f.Metadata.TypeName == "OutputParameterActivity");

            if (factory == null)
            {
            }
            //Debug.Assert(factory != null, "Default factory for Output activity not found.");
            if (factory == null)
            {
                return;
            }

            var output = factory.CreateExport().Value;

            output
            .SetValue(DesignProperties.PositionX, 10)
            .SetValue(DesignProperties.PositionY, 10);
            Workflow.AddItem(output);
        }
Exemplo n.º 2
0
        private FunctionActivity ParseActivity(XElement data)
        {
            var typeName = (string)data.Attribute("Type");

            if (string.IsNullOrEmpty(typeName))
            {
                return(null);
            }

            var factory = ActivityFactories.FirstOrDefault(f => f.Metadata.TypeName == typeName);

            if (factory == null)
            {
                return(null);
            }

            var activity = factory.CreateExport().Value;

            activity.LoadXml(data);

            return(activity);
        }