Esempio n. 1
0
        private bool IsShadowingExistingCommands(string commandName)
        {
            commandName = ModuleCmdletBase.AddPrefixToCommandName(commandName, this.Prefix);
            CommandSearcher searcher = new CommandSearcher(commandName, SearchResolutionOptions.None, CommandTypes.All, base.Context);

            foreach (string str in searcher.ConstructSearchPatternsFromName(commandName))
            {
                if (this.ExistingCommands.ContainsKey(str))
                {
                    return(true);
                }
            }
            return(false);
        }
Esempio n. 2
0
 /// <summary>
 /// for diagnostic purposes
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(ModuleCmdletBase.AddPrefixToCommandName(Name, Prefix));
 }