private IPattern ChoosePattern(INotifyAction action, string senderName, Notify.Engine.NotifyRequest request) { if (action == NotifyConstants.Event_ShareDocument || action == NotifyConstants.Event_UpdateDocument) { return(ActionPatternProvider.GetPattern(action, senderName)); } return(null); }
private IPattern ChoosePattern(INotifyAction action, string senderName, ASC.Notify.Engine.NotifyRequest request) { if (action == PhotoConst.NewEventComment) { if (request.Arguments.Exists((tv) => tv.Tag.Name == "FEED_TYPE")) { return(ActionPatternProvider.GetPattern(PhotoConst.NewPhotoUploaded, senderName) ?? ActionPatternProvider.GetPattern(PhotoConst.NewPhotoUploaded)); } } return(null); }
private IPattern ChoosePattern(INotifyAction action, string senderName, Notify.Engine.NotifyRequest request) { if (action == NotifyConstants.Event_NewCommentForMessage) { var tag = request.Arguments.Find(tv => tv.Tag.Name == "EventType"); if (tag != null) { return(ActionPatternProvider.GetPattern(new NotifyAction(Convert.ToString(tag.Value), ""), senderName)); } } return(null); }
private IPattern SelectPattern(INotifyAction action, string sender, NotifyRequest request) { if (action != Constants.ActionAdminNotify) { return(null); //after that pattern will be selected by xml } var tagvalue = request.Arguments.Find(tag => tag.Tag.Name == "UNDERLYING_ACTION"); if (tagvalue == null) { return(null); } return(ActionPatternProvider.GetPattern(new NotifyAction(Convert.ToString(tagvalue.Value), ""), sender)); }