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