Exemplo n.º 1
0
 private static void SerializeRuleSet(string ruleSetFileName, System.Workflow.Activities.Rules.RuleSet ruleSet)
 {
     System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializer serializerWrite = new System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializer();
     XmlWriter rulesWriter = XmlWriter.Create(RuleFilePath + ruleSetFileName);
     serializerWrite.Serialize(rulesWriter, ruleSet);
     rulesWriter.Close();
 }
Exemplo n.º 2
0
        private void SerializeRuleSet()
        {
            System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializer serializerWrite = new System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializer();
            XmlWriter rulesWriter = XmlWriter.Create(this.RuleResourceFileName);

            serializerWrite.Serialize(rulesWriter, this.m_RuleSet);
            rulesWriter.Close();
        }
Exemplo n.º 3
0
        private static void SerializeRuleSet(string ruleSetFileName, System.Workflow.Activities.Rules.RuleSet ruleSet)
        {
            System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializer serializerWrite = new System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializer();
            XmlWriter rulesWriter = XmlWriter.Create(RuleFilePath + ruleSetFileName);

            serializerWrite.Serialize(rulesWriter, ruleSet);
            rulesWriter.Close();
        }
Exemplo n.º 4
0
        public static void CreateRuleSetFile(Type objectType)
        {
            System.Workflow.Activities.Rules.RuleSet ruleSet = new System.Workflow.Activities.Rules.RuleSet();

            string objectPath = objectType.FullName.Replace("YellowstonePathology.Business.Rules", string.Empty);
            string fileName   = m_RuleFilePath + objectPath.Replace(".", "\\") + ".xml";

            if (System.IO.File.Exists(fileName) == false)
            {
                System.Workflow.Activities.Rules.Design.RuleSetDialog ruleSetDialog = new System.Workflow.Activities.Rules.Design.RuleSetDialog(objectType, null, ruleSet);
                ruleSetDialog.ShowDialog();
                ruleSet = ruleSetDialog.RuleSet;
                System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializer serializerWrite = new System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializer();
                XmlWriter rulesWriter = XmlWriter.Create(fileName);
                serializerWrite.Serialize(rulesWriter, ruleSet);
                rulesWriter.Close();
            }
            else
            {
                System.Windows.MessageBox.Show("Can't create rule. The rule name already exists!");
            }
        }
Exemplo n.º 5
0
        public static void CreateRuleSetFile(Type objectType)
        {
            System.Workflow.Activities.Rules.RuleSet ruleSet = new System.Workflow.Activities.Rules.RuleSet();

            string objectPath = objectType.FullName.Replace("YellowstonePathology.Business.Rules", string.Empty);
            string fileName = m_RuleFilePath + objectPath.Replace(".", "\\") + ".xml";

            if (System.IO.File.Exists(fileName) == false)
            {
                System.Workflow.Activities.Rules.Design.RuleSetDialog ruleSetDialog = new System.Workflow.Activities.Rules.Design.RuleSetDialog(objectType, null, ruleSet);
                ruleSetDialog.ShowDialog();
                ruleSet = ruleSetDialog.RuleSet;
                System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializer serializerWrite = new System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializer();
                XmlWriter rulesWriter = XmlWriter.Create(fileName);
                serializerWrite.Serialize(rulesWriter, ruleSet);
                rulesWriter.Close();
            }
            else
            {
                System.Windows.MessageBox.Show("Can't create rule. The rule name already exists!");
            }
        }
Exemplo n.º 6
0
 private void SerializeRuleSet()
 {
     System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializer serializerWrite = new System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializer();
     XmlWriter rulesWriter = XmlWriter.Create(this.RuleResourceFileName);
     serializerWrite.Serialize(rulesWriter, this.m_RuleSet);
     rulesWriter.Close();
 }