CommandLine.OptionMap.this C# (CSharp) Method

this() public method

public this ( string key ) : OptionInfo
key string
return OptionInfo
        public OptionInfo this[string key]
        {
            get
            {
                OptionInfo option = null;
                if (this.map.ContainsKey(key))
                {
                    option = this.map[key];
                }
                else
                {
                    string optionKey = null;
                    if (this.names.ContainsKey(key))
                    {
                        optionKey = this.names[key];
                        option = this.map[optionKey];
                    }
                }
                return option;
            }
            set
            {
                this.map[key] = value;
                if (value.HasBothNames)
                {
                    this.names[value.LongName] = value.ShortName;
                }
            }
        }