protected IParseRule(IParseRuleOption option) { this.Client = option.Client; this.ParseFlag = option.ParseFlag; this.Regex = option.Regex == null ? null : new Regex(option.Regex, RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase); this.Ignore = option.Ignore == null ? null : new Regex(option.Ignore, RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase); this.UrlRegex = option.UrlRegex == null ? null : new Regex(option.UrlRegex, RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase); this.WndClass = option.WndClass; this.WndClassTop = option.WndClassTop; this.PluginUrl = option.PluginUrl; this.PipeName = option.PipeName; this.ClientIcon = App.Current.Dispatcher.Invoke(new Func <BitmapImage>(() => new BitmapImage(new Uri(string.Format(UriBase, option.ClientIcon), UriKind.RelativeOrAbsolute)))); }
protected IParseRule(IParseRuleOption option) { this.Client = option.Client; this.ParseFlag = option.ParseFlag; this.Regex = option.Regex == null ? null : new Regex(option.Regex, RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase); this.Ignore = option.Ignore == null ? null : new Regex(option.Ignore, RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase); this.UrlRegex = option.UrlRegex == null ? null : new Regex(option.UrlRegex, RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase); this.WndClass = option.WndClass; this.WndClassTop = option.WndClassTop; this.PluginUrl = option.PluginUrl; this.PipeName = option.PipeName; this.ClientIcon = App.Current.Dispatcher.Invoke(new Func<BitmapImage>(() => new BitmapImage(new Uri(string.Format(UriBase, option.ClientIcon), UriKind.RelativeOrAbsolute)))); }