public static String ToJson(this NotifierEntity entity)
 {
     if (entity == null)
     {
         throw new ArgumentNullException("NotifierEntity can not be null!");
     }
     return(new JavaScriptSerializer().Serialize(entity));
 }
Beispiel #2
0
 public static PushSqlDependency Instance(NotifierEntity notifierEntity, Action <String> dispatcher)
 {
     if (instance == null)
     {
         instance = new PushSqlDependency(notifierEntity, dispatcher);
     }
     return(instance);
 }
 internal SqlDependencyRegister(NotifierEntity notificationEntity)
 {
     this.notificationEntity = notificationEntity;
     RegisterForNotifications();
 }
Beispiel #4
0
 private PushSqlDependency(NotifierEntity notifierEntity, Action <String> dispatcher)
 {
     this.dispatcher       = dispatcher;
     sqlDependencyNotifier = new SqlDependencyRegister(notifierEntity);
     sqlDependencyNotifier.SqlNotification += OnSqlNotification;
 }