Пример #1
0
 public void ParseInfo(Hashtable info)
 {
     id                = info.Value <string>((int)SPC.Id);
     respondAction     = (NotficationRespondAction)info.Value <int>((int)SPC.RespondAction);
     sourceServiceType = (NotificationSourceServiceType)info.Value <int>((int)SPC.SourceServiceType);
     text              = info.Value <string>((int)SPC.Text);
     data              = info.Value <Hashtable>((int)SPC.Data);
     handled           = info.Value <bool>((int)SPC.Handled);
     subType           = (NotificationSubType)(int)info.GetValue <int>((int)SPC.SubType, (int)NotificationSubType.Unknown);
 }
Пример #2
0
        public Notification Create(string uniqueID, string text, Hashtable data, NotficationRespondAction respondAction, NotificationSourceServiceType serviceType, NotificationSubType subType)
        {
            Notification notification = new Notification {
                uniqueID          = uniqueID,
                data              = data,
                handled           = false,
                id                = Guid.NewGuid().ToString(),
                respondAction     = (int)respondAction,
                sourceServiceType = (int)serviceType,
                text              = text,
                subType           = (int)subType
            };

            return(notification);
        }