コード例 #1
0
        /// <summary>
        /// Actual work.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DoWork_ChangeReferences(object sender, DoWorkEventArgs e)
        {
            var rules = ((object[])(e.Argument))[0] as string;

            var referenceChanger = new ReferenceChanger(_memory);

            _ruleParser = new RuleParser(_memory);
            referenceChanger.OnProgressHandler += OnProgress;
            referenceChanger.ParseRules(_ruleParser, rules);
            Dispatcher.BeginInvoke(new Action(() =>
            {
                ProgressBarRules.Maximum = 100;
            }));
            referenceChanger.ChangeReferences();
        }
コード例 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public void ParseRules(RuleParser ruleParser, string rules)
 {
     _ruleParser = ruleParser;
     _ruleParser.Parse(rules);
 }