MCPcopy Create free account
hub / github.com/Squirrel/Squirrel.Windows / AddImpl

Method AddImpl

src/Update/Mono.Options/Options.cs:764–781  ·  view source on GitHub ↗
(Option option)

Source from the content-addressed store, hash-verified

762 }
763
764 private void AddImpl (Option option)
765 {
766 if (option == null)
767 throw new ArgumentNullException ("option");
768 List<string> added = new List<string> (option.Names.Length);
769 try {
770 // KeyedCollection.InsertItem/SetItem handle the 0th name.
771 for (int i = 1; i < option.Names.Length; ++i) {
772 Dictionary.Add (option.Names [i], option);
773 added.Add (option.Names [i]);
774 }
775 }
776 catch (Exception) {
777 foreach (string name in added)
778 Dictionary.Remove (name);
779 throw;
780 }
781 }
782
783 public OptionSet Add (string header)
784 {

Callers

nothing calls this directly

Calls 2

AddMethod · 0.45
RemoveMethod · 0.45

Tested by

no test coverage detected