ZeroInstall.Store.Model.Element.this C# (CSharp) Method

this() private method

private this ( [ name ) : Command
name [
return Command
        public Command this[[NotNull] string name]
        {
            get
            {
                #region Sanity checks
                if (name == null) throw new ArgumentNullException(nameof(name));
                #endregion

                if (name.Length == 0) return null;
                try
                {
                    return Commands.First(command => command != null && command.Name == name);
                }
                    #region Error handling
                catch (InvalidOperationException)
                {
                    throw new KeyNotFoundException(string.Format(Resources.CommandNotFound, name));
                }
                #endregion
            }
        }