public RuleAction(JToken node) : base(node)
 {
     if (node["type"] != null)
     {
         this._Type = (RuleActionType)StringEnum.Parse(typeof(RuleActionType), node["type"].Value <string>());
     }
 }
Exemplo n.º 2
0
 private static IEnumerable <ParameterValue> CreateParemeterValues(RuleActionType actionType)
 {
     if (actionType.ParameterObject != null)
     {
         return(actionType.ParameterObject.GetType().GetProperties().Select(x => new ParameterValue(x)));
     }
     return(new List <ParameterValue>());
 }
Exemplo n.º 3
0
        public static BaseRuleAction CreateAction(RuleActionType ruleActionType, string moveWhere, Win32Window window, WindowManager windowManager)
        {
            switch (ruleActionType)
            {
            case RuleActionType.Move:
                return(new MoveRuleAction(moveWhere, window, windowManager));

            default:
                return(null);
            }
        }
 public RuleAction(XmlElement node) : base(node)
 {
     foreach (XmlElement propertyNode in node.ChildNodes)
     {
         switch (propertyNode.Name)
         {
         case "type":
             this._Type = (RuleActionType)StringEnum.Parse(typeof(RuleActionType), propertyNode.InnerText);
             continue;
         }
     }
 }
Exemplo n.º 5
0
 protected MoveCopyActionBase(RuleActionType type, uint userFlags, byte[] destinationStoreEntryId, StoreObjectId destinationFolderId, byte[] externalDestinationFolderId) : base(type, userFlags)
 {
     if (externalDestinationFolderId != null)
     {
         Util.ThrowOnNullArgument(destinationStoreEntryId, "destinationStoreEntryId");
     }
     if (destinationFolderId != null == (externalDestinationFolderId != null))
     {
         throw new ArgumentException("There must be either a destination folder id (as a StoreObjectId) or an external folder id (as a byte[]), but not both.");
     }
     this.DestinationStoreEntryId     = destinationStoreEntryId;
     this.DestinationFolderId         = destinationFolderId;
     this.ExternalDestinationFolderId = externalDestinationFolderId;
     this.FolderIsInThisStore         = (destinationFolderId != null);
 }
Exemplo n.º 6
0
 public IEnumerable<IParameterValue> CreateParameterValues(RuleActionType actionType)
 {
     if (actionType.ParameterObject != null)
         return actionType.ParameterObject.GetType().GetProperties().Select(x => new ParameterValue(x));
     return new List<IParameterValue>();
 }
Exemplo n.º 7
0
 public RuleAction(ProgramRule rule, RuleActionType action)
 {
     this.Rule   = rule;
     this.Action = action;
 }
Exemplo n.º 8
0
 private IEnumerable <ParameterValue> CreateParemeterValues(RuleActionType actionType)
 {
     return(_automationService.CreateParameterValues(actionType));
 }
Exemplo n.º 9
0
 internal ReplyActionBase(RuleActionType type, uint userFlags, StoreObjectId replyTemplateMessageId, Guid replyTemplateGuid) : base(type, userFlags)
 {
     this.ReplyTemplateMessageId = replyTemplateMessageId;
     this.ReplyTemplateGuid      = replyTemplateGuid;
 }
Exemplo n.º 10
0
 protected ForwardActionBase(RuleActionType type, uint userFlags, RuleAction.ForwardActionBase.ActionRecipient[] recipients) : base(type, userFlags)
 {
     Util.ThrowOnNullArgument(recipients, "recipients");
     this.Recipients = recipients;
 }
Exemplo n.º 11
0
 protected RuleAction(RuleActionType type, uint userFlags)
 {
     EnumValidator.ThrowIfInvalid <RuleActionType>(type);
     this.ActionType = type;
     this.UserFlags  = userFlags;
 }