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
 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();
 }
示例#4
0
 private PushSqlDependency(NotifierEntity notifierEntity, Action <String> dispatcher)
 {
     this.dispatcher       = dispatcher;
     sqlDependencyNotifier = new SqlDependencyRegister(notifierEntity);
     sqlDependencyNotifier.SqlNotification += OnSqlNotification;
 }