public CmdletInfo GetCmdletByTypeName(string cmdletTypeName) { if (string.IsNullOrEmpty(cmdletTypeName)) { throw PSTraceSource.NewArgumentNullException("cmdletTypeName"); } Exception exception = null; Type implementingType = LanguagePrimitives.ConvertStringToType(cmdletTypeName, out exception); if (exception != null) { throw exception; } if (implementingType == null) { return(null); } CmdletAttribute attribute = null; foreach (object obj2 in implementingType.GetCustomAttributes(true)) { attribute = obj2 as CmdletAttribute; if (attribute != null) { break; } } if (attribute == null) { throw PSTraceSource.NewNotSupportedException(); } string nounName = attribute.NounName; return(new CmdletInfo(attribute.VerbName + "-" + nounName, implementingType, null, null, this._context)); }