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