本文整理汇总了C#中INotifyAction类的典型用法代码示例。如果您正苦于以下问题:C# INotifyAction类的具体用法?C# INotifyAction怎么用?C# INotifyAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
INotifyAction类属于命名空间,在下文中一共展示了INotifyAction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Subscribe
public virtual void Subscribe(INotifyAction action, string objectID, IRecipient recipient)
{
if (action == null) throw new ArgumentNullException("action");
if (recipient == null) throw new ArgumentNullException("recipient");
subscriptionProvider.Subscribe(action, objectID, recipient);
}
示例2: GetSubscriptions
public string[] GetSubscriptions(INotifyAction action, IRecipient recipient, bool checkSubscribe = true)
{
if (action == null) throw new ArgumentNullException("action");
if (recipient == null) throw new ArgumentNullException("recipient");
return subscriptionManager.GetSubscriptions(sourceID, action.ID, recipient.ID, checkSubscribe);
}
示例3: SendResponse
public SendResponse(INotifyAction action, IRecipient recipient, Exception exc)
{
Result = SendResult.Impossible;
Exception = exc;
Recipient = recipient;
NotifyAction = action;
}
示例4: GetSubscriptionMethod
public string[] GetSubscriptionMethod(INotifyAction action, IRecipient recipient)
{
if (action == null) throw new ArgumentNullException("action");
if (recipient == null) throw new ArgumentNullException("recipient");
return subscriptionManager.GetSubscriptionMethod(sourceID, action.ID, recipient.ID);
}
示例5: IsUnsubscribe
public virtual bool IsUnsubscribe(IDirectRecipient recipient, INotifyAction action, string objectID)
{
if (action == null) throw new ArgumentNullException("action");
if (recipient == null) throw new ArgumentNullException("recipient");
return subscriptionProvider.IsUnsubscribe(recipient, action, objectID);
}
示例6: NoticeMessage
public NoticeMessage(IDirectRecipient recipient, INotifyAction action, string objectID)
{
if (recipient == null) throw new ArgumentNullException("recipient");
Recipient = recipient;
Action = action;
ObjectID = objectID;
}
示例7: IsUnsubscribe
public bool IsUnsubscribe(IDirectRecipient recipient, INotifyAction action, string objectID)
{
if (recipient == null) throw new ArgumentNullException("recipient");
if (action == null) throw new ArgumentNullException("action");
return subscriptionManager.IsUnsubscribe(sourceID, recipient.ID, action.ID, objectID);
}
示例8: Subscribe
public void Subscribe(INotifyAction action, string objectID, IRecipient recipient)
{
if (action == null) throw new ArgumentNullException("action");
if (recipient == null) throw new ArgumentNullException("recipient");
subscriptionManager.Subscribe(sourceID, action.ID, objectID, recipient.ID);
}
示例9: ProjectEntityEngine
public ProjectEntityEngine(INotifyAction notifyAction, EngineFactory factory)
{
SubscriptionProvider = NotifySource.Instance.GetSubscriptionProvider();
RecipientProvider = NotifySource.Instance.GetRecipientsProvider();
NotifyAction = notifyAction;
FileEngine = factory != null ? factory.GetFileEngine() : null;
Factory = factory;
}
示例10: ChoosePattern
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;
}
示例11: IsSubscribed
public static bool IsSubscribed(this ISubscriptionProvider provider, INotifyAction action, IRecipient recipient,
string objectID)
{
return Array.Exists(
provider.GetSubscriptions(action, recipient),
id => id == objectID || (string.IsNullOrEmpty(id) && string.IsNullOrEmpty(objectID))
);
}
示例12: ChoosePattern
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;
}
示例13: SelectPattern
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);
}
示例14: GetRecipients
public IRecipient[] GetRecipients(INotifyAction action, string objectID)
{
if (action == null) throw new ArgumentNullException("action");
return subscriptionManager.GetRecipients(sourceID, action.ID, objectID)
.Select(r => recipientProvider.GetRecipient(r))
.Where(r => r != null)
.ToArray();
}
示例15: GetRecipients
public virtual IRecipient[] GetRecipients(INotifyAction action, string objectID)
{
if (action == null) throw new ArgumentNullException("action");
var recipents = new List<IRecipient>(5);
IRecipient[] directRecipients = _directSubscriptionProvider.GetRecipients(action, objectID) ??
new IRecipient[0];
recipents.AddRange(directRecipients);
return recipents.ToArray();
}