[AttributeUsage(AttributeTargets.Method, AllowMultiple=true, Inherited=false)]
public sealed class CommandMethodAttribute : Attribute, ICommandLineCallable
{
// Methods
public CommandMethodAttribute(string globalName);
public CommandMethodAttribute(string globalName, CommandFlags flags);
public CommandMethodAttribute(string groupName, string globalName, CommandFlags flags);
public CommandMethodAttribute(string groupName, string globalName, string localizedNameId, CommandFlags flags);
public CommandMethodAttribute(string groupName, string globalName, string localizedNameId, CommandFlags flags, string helpTopic);
public CommandMethodAttribute(string groupName, string globalName, string localizedNameId, CommandFlags flags, Type contextMenuExtensionType);
public CommandMethodAttribute(string groupName, string globalName, string localizedNameId, CommandFlags flags, Type contextMenuExtensionType, string helpFileName, string helpTopic);
// Properties
public virtual string HelpTopic { get; }
public virtual string HelpFileName { get; }
public virtual Type ContextMenuExtensionType { get; }
public virtual CommandFlags Flags { get; }
public virtual string GroupName { get; }
public virtual string LocalizedNameId { get; }
public virtual string GlobalName { get; }
}
These are the attribute signatures ( from reflection )
and the main method
public CommandMethodAttribute(string groupName, string globalName, string localizedNameId, CommandFlags flags, Type contextMenuExtensionType, string helpFileName, string helpTopic)
{
this.m_groupName = groupName;
this.m_globalName = globalName;
this.m_localizedNameId = localizedNameId;
this.m_flags = flags;
this.m_contextMenuExtensionType = contextMenuExtensionType;
this.m_helpFileName = helpFileName;
this.m_helpTopic = helpTopic;
}
added:
@_gile beat me 🙂
Regards
// Called Kerry or kdub in my other life.
Everything will work just as you expect it to, unless your expectations are incorrect. ~ kdub
Sometimes the question is more important than the answer. ~ kdub
NZST UTC+12 : class keyThumper<T> : Lazy<T>; another Swamper