Esempio n. 1
0
 public static async Task <bool> DropDatabaseAsync(string databaseName)
 {
     return(await WcfServiceHelper.Execute(async service => await service.DropDatabaseAsync(databaseName)));
 }
Esempio n. 2
0
 public static bool DropCollection(string databaseName, string collectionName)
 {
     return(WcfServiceHelper.Execute(service => service.DropCollection(databaseName, collectionName)));
 }
Esempio n. 3
0
 public static bool DropDatabase(string databaseName)
 {
     return(WcfServiceHelper.Execute(service => service.DropDatabase(databaseName)));
 }
Esempio n. 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)));
 }
Esempio n. 5
0
 public static async Task <bool> CreateCollectionAsync(string databaseName, string collectionName)
 {
     return(await WcfServiceHelper.Execute(async service => await service.CreateCollectionAsync(databaseName, collectionName)));
 }
Esempio n. 6
0
 public static async void SaveAsync(string databaseName = null)
 {
     await WcfServiceHelper.Execute(service => service.SaveAsync(databaseName));
 }
Esempio n. 7
0
 public static bool Remove(string databaseName, string collectionName, string key)
 {
     return(WcfServiceHelper.Execute(service => service.Remove(databaseName, collectionName, key)));
 }
Esempio n. 8
0
 public static void Save(string databaseName = null)
 {
     WcfServiceHelper.Execute(service => service.Save(databaseName));
 }
Esempio n. 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));
 }
Esempio n. 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);
        }
Esempio n. 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));
 }
Esempio n. 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);
        }