예제 #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();
 }