public static IEnumerable <string> GetAliases(this SlackMessageOptions option) { var memberInfos = option.GetType().GetMember(option.ToString()); var attribute = memberInfos[0].GetCustomAttributes(typeof(AliasAttribute), false); return(((AliasAttribute)attribute.ElementAt(0)).Aliases); }
private bool IsAliasForOption(SlackMessageOptions option) { return(option.GetAliases().Contains(command)); }
protected SlackMessageInterpreter(SlackMessageOptions option) { this.option = option; }