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

Method GetKeyForItem

src/SyncReleases/Mono.Options/Options.cs:718–727  ·  view source on GitHub ↗
(Option item)

Source from the content-addressed store, hash-verified

716
717
718 protected override string GetKeyForItem (Option item)
719 {
720 if (item == null)
721 throw new ArgumentNullException ("option");
722 if (item.Names != null && item.Names.Length > 0)
723 return item.Names [0];
724 // This should never happen, as it's invalid for Option to be
725 // constructed w/o any names.
726 throw new InvalidOperationException ("Option has no names!");
727 }
728
729 [Obsolete ("Use KeyedCollection.this[string]")]
730 protected Option GetOptionForName (string option)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected