public OptionsCollection ToOptionsCollection() { var r = new OptionsCollection(); foreach (var opt in SerializableOptions) { r.Add(opt.OptionName, opt.OptionValue); } return(r); }
private void OnAddOptionClick(object sender, RoutedEventArgs e) { var opt = new StyleOption { Name = NewExpressionString }; OptionsCollection.Add(opt); expressionsListBox.SelectedIndex = OptionsCollection.Count - 1; expressionsListBox.ScrollIntoView(opt); ValidateDeleteButton(); }
internal Task TestAllOptionsOffAsync( TestHost host, string initialMarkup, string expectedMarkup, ParseOptions parseOptions = null, CompilationOptions compilationOptions = null, int index = 0, OptionsCollection options = null) { options = options ?? new OptionsCollection(GetLanguage()); options.AddRange(AllOptionsOff); options.Add(RemoteHostOptions.RemoteHostTest, host != TestHost.InProcess); return(TestAsync(initialMarkup, expectedMarkup, parseOptions, compilationOptions, index, options)); }
/// <summary> /// Adds the element to the options collection. /// </summary> /// <param name="element">The option element to add.</param> /// <param name="before">The following element.</param> public void AddOption(IHtmlOptionElement element, IHtmlElement before = null) { _options.Add(element, before); }