コード例 #1
0
        /// <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);
        }
コード例 #2
0
ファイル: ClassFactory.cs プロジェクト: lulzzz/daipan
        /// <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);
        }
コード例 #3
0
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="def"></param>
 public ConditionCollectionFactory(ConditionCollectionClassDefinition def)
 {
     _definition = def;
 }