public static void InitApp(string applicationId, string secretKey, string version) { if (string.IsNullOrEmpty(applicationId)) { throw new ArgumentNullException(ExceptionMessage.NULL_APPLICATION_ID); } if (string.IsNullOrEmpty(secretKey)) { throw new ArgumentNullException(ExceptionMessage.NULL_SECRET_KEY); } if (string.IsNullOrEmpty(version)) { throw new ArgumentNullException(ExceptionMessage.NULL_VERSION); } AppId = applicationId; SecretKey = secretKey; VersionNum = version; Persistence = new PersistenceService(); Data = Persistence; Geo = new BackendlessAPI.Service.GeoService(); Messaging = new BackendlessAPI.Service.MessagingService(); Files = new BackendlessAPI.Service.FileService(); UserService = new BackendlessAPI.Service.UserService(); Events = BackendlessAPI.Events.GetInstance(); Cache = BackendlessAPI.Caching.Cache.GetInstance(); Counters = BackendlessAPI.Counters.CounterService.GetInstance(); Logging = new BackendlessAPI.Logging.LoggingService(); HeadersManager.CleanHeaders(); }
public bool CompareAndSet(Int64 expected, Int64 updated) { return(CounterService.GetInstance().CompareAndSet(counterName, expected, updated)); }
public void GetAndAdd(Int64 value, Async.AsyncCallback <T> callback) { CounterService.GetInstance().GetAndAdd(counterName, value, callback); }
public T GetAndAdd(Int64 value) { return(CounterService.GetInstance().GetAndAdd <T>(counterName, value)); }
public T AddAndGet(Int64 value) { return(CounterService.GetInstance().AddAndGet <T>(counterName, value)); }
public void DecrementAndGet(Async.AsyncCallback <T> callback) { CounterService.GetInstance().DecrementAndGet(counterName, callback); }
public T DecrementAndGet() { return(CounterService.GetInstance().DecrementAndGet <T>(counterName)); }
public T GetAndDecrement() { return(CounterService.GetInstance().GetAndDecrement <T>(counterName)); }
public T Get() { return(CounterService.GetInstance().Get <T>(counterName)); }
public void Reset(AsyncCallback <Object> callback) { CounterService.GetInstance().Reset(counterName, callback); }
public void Reset() { CounterService.GetInstance().Reset(counterName); }
public void CompareAndSet(Int64 expected, Int64 updated, Async.AsyncCallback <bool> callback) { CounterService.GetInstance().CompareAndSet(counterName, expected, updated, callback); }
public static void InitApp(string applicationId, string secretKey, string version) { if (string.IsNullOrEmpty(applicationId)) throw new ArgumentNullException(ExceptionMessage.NULL_APPLICATION_ID); if (string.IsNullOrEmpty(secretKey)) throw new ArgumentNullException(ExceptionMessage.NULL_SECRET_KEY); if (string.IsNullOrEmpty(version)) throw new ArgumentNullException(ExceptionMessage.NULL_VERSION); AppId = applicationId; SecretKey = secretKey; VersionNum = version; Persistence = new PersistenceService(); Data = Persistence; Geo = new BackendlessAPI.Service.GeoService(); Messaging = new BackendlessAPI.Service.MessagingService(); Files = new BackendlessAPI.Service.FileService(); UserService = new BackendlessAPI.Service.UserService(); Events = BackendlessAPI.Events.GetInstance(); Cache = BackendlessAPI.Caching.Cache.GetInstance(); Counters = BackendlessAPI.Counters.CounterService.GetInstance(); Logging = new BackendlessAPI.Logging.LoggingService(); HeadersManager.CleanHeaders(); }