/// <summary> /// Finishes creation of the ConditionCollectionClassDefinition and returns it. /// This object of type ConditionCollectionFactory looses its function after calling Finish() /// </summary> /// <returns></returns> public ConditionCollectionClassDefinition Finish() { var buffer = _definition; _definition = null; return(buffer); }
/// <summary> /// Factory class creator/getter for CWF's transition condition method classes /// </summary> /// <param name="ns">Namespace</param> /// <param name="classname">Class name</param> /// <param name="dataType">the data type of the condition check object to be used.</param> /// <param name="additionalUsings">optional additional used namespaces</param> /// <returns></returns> public static ConditionCollectionFactory CreateWorkflowConditionCollectionClassDefinition(string ns, string classname, Type dataType, params string[] additionalUsings) { var def = new ConditionCollectionClassDefinition() { Namespace = ns, ClassName = classname, DataTypeFullName = dataType.FullName }; foreach (var u in additionalUsings) { def.AddUsing(u); } def.AddAssemblyLocation(dataType.Assembly.Location); ConditionCollectionFactory factory = new ConditionCollectionFactory(def); return(factory); }
/// <summary> /// constructor /// </summary> /// <param name="def"></param> public ConditionCollectionFactory(ConditionCollectionClassDefinition def) { _definition = def; }