Beispiel #1
0
        public void Test2()
        {
            EventWithDelegate ewd = new EventWithDelegate();
            int         i         = 10;
            Transformer t;

            t  = ewd.Square;
            t += ewd.Cuber;
            t.Invoke(i);

            NotificationMethods obj = new NotificationMethods();

            obj.transformerEvent += User1.Xhandler; //subscribe of event
            obj.transformerEvent += User2.Yhandler; //un-subscribe of event

            obj.NotifyOnCell(i);
        }
 /// <summary>
 /// Gets a collection of all <see cref="INotificationGatewayMethod"/>s for this provider
 /// </summary>
 /// <returns>A collection of <see cref="INotificationGatewayMethod"/></returns>
 public override IEnumerable <INotificationGatewayMethod> GetAllNotificationGatewayMethods()
 {
     return(NotificationMethods.Select(method => new SmtpNotificationGatewayMethod(GatewayProviderService, method, ExtendedData)));
 }
 /// <summary>
 /// Returns a collection of all possible gateway methods associated with this provider
 /// </summary>
 /// <returns>A collection of <see cref="IGatewayResource"/></returns>
 public override IEnumerable <IGatewayResource> ListResourcesOffered()
 {
     return(AvailableResources.Where(x => NotificationMethods.All(y => y.ServiceCode != x.ServiceCode)));
 }
 public Status updateToken(string token, int user_id)
 {
     return(NotificationMethods.updateToken(token, user_id));
 }
 public Status getUserNotificationService(int user_id, String datetime, int offset)
 {
     return(NotificationMethods.getUserNotificationService(user_id, datetime, offset));
 }