コード例 #1
0
        public static ControlPanelAction GetAction(this ControlPanelActionType type)
        {
            var attribute =
                type.GetType().GetField(type.ToString()).GetCustomAttribute <ControlPanelActionSpecification>();

            if (attribute != null)
            {
                return(new ControlPanelAction
                {
                    Glyphicon = attribute.Glyphicon,
                    ActionName = attribute.ActionName
                });
            }

            return(null);
        }
コード例 #2
0
 public BsControlPanelActionsFactory Remove(ControlPanelActionType actionType)
 {
     return Remove(x => x.ActionName == actionType.GetAction().ActionName);
 }
コード例 #3
0
 public BsControlPanelActionsFactory Add(ControlPanelActionType actionType)
 {
     return Add(actionType.GetAction());
 }
コード例 #4
0
 public BsControlPanelActionsFactory Remove(ControlPanelActionType actionType)
 {
     return(Remove(x => x.ActionName == actionType.GetAction().ActionName));
 }
コード例 #5
0
 public BsControlPanelActionsFactory Add(ControlPanelActionType actionType)
 {
     return(Add(actionType.GetAction()));
 }