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