Beispiel #1
0
 public static async Task <bool> DropDatabaseAsync(string databaseName)
 {
     return(await WcfServiceHelper.Execute(async service => await service.DropDatabaseAsync(databaseName)));
 }
Beispiel #2
0
 public static bool DropCollection(string databaseName, string collectionName)
 {
     return(WcfServiceHelper.Execute(service => service.DropCollection(databaseName, collectionName)));
 }
Beispiel #3
0
 public static bool DropDatabase(string databaseName)
 {
     return(WcfServiceHelper.Execute(service => service.DropDatabase(databaseName)));
 }
Beispiel #4
0
 public static async Task <bool> RemoveAsync(string databaseName, string collectionName, string key)
 {
     return(await WcfServiceHelper.Execute(async service => await service.RemoveAsync(databaseName, collectionName, key)));
 }
Beispiel #5
0
 public static async Task <bool> CreateCollectionAsync(string databaseName, string collectionName)
 {
     return(await WcfServiceHelper.Execute(async service => await service.CreateCollectionAsync(databaseName, collectionName)));
 }
Beispiel #6
0
 public static async void SaveAsync(string databaseName = null)
 {
     await WcfServiceHelper.Execute(service => service.SaveAsync(databaseName));
 }
Beispiel #7
0
 public static bool Remove(string databaseName, string collectionName, string key)
 {
     return(WcfServiceHelper.Execute(service => service.Remove(databaseName, collectionName, key)));
 }
Beispiel #8
0
 public static void Save(string databaseName = null)
 {
     WcfServiceHelper.Execute(service => service.Save(databaseName));
 }
Beispiel #9
0
 public static async void SetBinValueAsync(string databaseName, string collectionName, string key, byte[] data)
 {
     await WcfServiceHelper.Execute(async service => service.SetValueAsync(databaseName, collectionName, key, isCompression ? await CompressAsync(data) : data));
 }
Beispiel #10
0
        public static async Task <byte[]> GetBinValueAsync(string databaseName, string collectionName, string key)
        {
            var data = await WcfServiceHelper.Execute(service => service.GetValueAsync(databaseName, collectionName, key));

            return(data == null ? null : isCompression ? await DecompressAsync(data) : data);
        }
Beispiel #11
0
 public static void SetBinValue(string databaseName, string collectionName, string key, byte[] data)
 {
     WcfServiceHelper.Execute(service => service.SetValue(databaseName, collectionName, key, isCompression ? Compress(data) : data));
 }
Beispiel #12
0
        public static byte[] GetBinValue(string databaseName, string collectionName, string key)
        {
            var data = WcfServiceHelper.Execute(service => service.GetValue(databaseName, collectionName, key));

            return(data == null ? null : isCompression?Decompress(data) : data);
        }