Пример #1
0
 public static SignedCondition Create(Rule rule)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     return(new SignedCondition(rule));
 }
Пример #2
0
 public static SentToOrCcMeCondition Create(Rule rule)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     return(new SentToOrCcMeCondition(rule));
 }
Пример #3
0
 public static ReadReceiptCondition Create(Rule rule)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     return(new ReadReceiptCondition(rule));
 }
 public static AutomaticForwardCondition Create(Rule rule)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     return(new AutomaticForwardCondition(rule));
 }
 public static HasAttachmentCondition Create(Rule rule)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     return(new HasAttachmentCondition(rule));
 }
Пример #6
0
 public static MessageClassificationCondition Create(Rule rule, string[] text)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     return(new MessageClassificationCondition(rule, text));
 }
 public static ContainsSubjectStringCondition Create(Rule rule, string[] text)
 {
     Condition.CheckParams(new object[]
     {
         rule,
         text
     });
     return(new ContainsSubjectStringCondition(rule, text));
 }
Пример #8
0
 public static FormsCondition Create(ConditionType conditionType, Rule rule, string[] text)
 {
     Condition.CheckParams(new object[]
     {
         rule,
         text
     });
     return(new FormsCondition(conditionType, rule, text));
 }
Пример #9
0
 public static MarkedAsImportanceCondition Create(Rule rule, Importance importance)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     EnumValidator.ThrowIfInvalid <Importance>(importance, "importance");
     return(new MarkedAsImportanceCondition(rule, importance));
 }
Пример #10
0
 public static MarkedAsSensitivityCondition Create(Rule rule, Sensitivity sensitivity)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     EnumValidator.ThrowIfInvalid <Sensitivity>(sensitivity, "sensitivity");
     return(new MarkedAsSensitivityCondition(rule, sensitivity));
 }
 public static AssignedCategoriesCondition Create(Rule rule, string[] text)
 {
     Condition.CheckParams(new object[]
     {
         rule,
         text
     });
     return(new AssignedCategoriesCondition(rule, text));
 }
 public static SentToRecipientsCondition Create(Rule rule, IList <Participant> participants)
 {
     Condition.CheckParams(new object[]
     {
         rule,
         participants
     });
     RecipientCondition.CheckParticipants(rule, participants);
     return(new SentToRecipientsCondition(rule, participants));
 }
Пример #13
0
 public static MarkedAsOofCondition Create(Rule rule)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     return(new MarkedAsOofCondition(rule, new string[]
     {
         "IPM.Note.Rules.OofTemplate.Microsoft"
     }));
 }
 public static ApprovalRequestCondition Create(Rule rule)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     return(new ApprovalRequestCondition(rule, new string[]
     {
         "IPM.Note.Microsoft.Approval.Request"
     }));
 }
Пример #15
0
 public static PermissionControlledCondition Create(Rule rule)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     string[] text = new string[]
     {
         "IPM.Note.rpmsg.Microsoft.Voicemail.UM.CA",
         "IPM.Note.rpmsg.Microsoft.Voicemail.UM"
     };
     return(new PermissionControlledCondition(rule, text));
 }
 public static MeetingMessageCondition Create(Rule rule)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     string[] text = new string[]
     {
         "IPM.Schedule.Meeting.Request",
         "IPM.Schedule.Meeting.Canceled"
     };
     return(new MeetingMessageCondition(rule, text));
 }
Пример #17
0
 public static MeetingResponseCondition Create(Rule rule)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     string[] text = new string[]
     {
         "IPM.Schedule.Meeting.Resp.Pos",
         "IPM.Schedule.Meeting.Resp.Neg",
         "IPM.Schedule.Meeting.Resp.Tent"
     };
     return(new MeetingResponseCondition(rule, text));
 }
Пример #18
0
 public static EncryptedCondition Create(Rule rule)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     string[] text = new string[]
     {
         "IPM.Note.Secure",
         "IPM.Note" + "." + "SMIME.SignedEncrypted",
         "IPM.Note" + "." + "SMIME.Encrypted"
     };
     return(new EncryptedCondition(rule, text));
 }
Пример #19
0
        public static FlaggedForActionCondition Create(Rule rule, string action)
        {
            Condition.CheckParams(new object[]
            {
                rule
            });
            RequestedAction requestedAction;

            if (!RequestedAction.Any.ToString().Equals(action, StringComparison.OrdinalIgnoreCase) && EnumValidator.TryParse <RequestedAction>(action, EnumParseOptions.IgnoreCase, out requestedAction))
            {
                return(new FlaggedForActionCondition(rule, LocalizedDescriptionAttribute.FromEnum(FlaggedForActionCondition.RequestedActionType, requestedAction)));
            }
            return(new FlaggedForActionCondition(rule, action));
        }
 public static WithinDateRangeCondition Create(Rule rule, ExDateTime?rangeLow, ExDateTime?rangeHigh)
 {
     Condition.CheckParams(new object[]
     {
         rule
     });
     if (rangeLow == null && rangeHigh == null)
     {
         rule.ThrowValidateException(delegate
         {
             throw new ArgumentException("Both cannot be null");
         }, "rangeLow, rangeHigh");
     }
     if (rangeLow != null && rangeHigh != null && rangeLow > rangeHigh)
     {
         rule.ThrowValidateException(delegate
         {
             throw new ArgumentOutOfRangeException("rangeLow cannot be > rangeHigh");
         }, "rangeLow, rangeHigh");
     }
     return(new WithinDateRangeCondition(rule, rangeLow, rangeHigh));
 }