public static String ToJson(this NotifierEntity entity)
 {
     if (entity == null)
     {
         throw new ArgumentNullException("NotifierEntity can not be null!");
     }
     return(new JavaScriptSerializer().Serialize(entity));
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 4
0
 private PushSqlDependency(NotifierEntity notifierEntity, Action <String> dispatcher)
 {
     this.dispatcher       = dispatcher;
     sqlDependencyNotifier = new SqlDependencyRegister(notifierEntity);
     sqlDependencyNotifier.SqlNotification += OnSqlNotification;
 }