Пример #1
0
 public static string ToJson(this NotifierEntity entity)
 {
     if (entity == null)
     {
         throw new ArgumentNullException("NotifierEntity can not be null!");
     }
     return(new JavaScriptSerializer().Serialize(entity));
 }
Пример #2
0
 private PushSqlDependency(NotifierEntity notifierEntity, Action <string> dispatcher)
 {
     this.dispatcher       = dispatcher;
     sqlDependencyNotifier = new SqlDependencyRegister(notifierEntity);
     sqlDependencyNotifier.SqlNotification += OnSqlDependencyNotifierResultChanged;
 }
Пример #3
0
 public static PushSqlDependency Instance(NotifierEntity notifierEntity, Action <string> dispatcher)
 {
     return(instance ?? (instance = new PushSqlDependency(notifierEntity, dispatcher)));
 }
Пример #4
0
 internal SqlDependencyRegister(NotifierEntity notificationEntity)
 {
     this.notificationEntity = notificationEntity;
     RegisterForNotifications();
 }