static void Main(string[] args) { var serviceRootUri = new Uri("http://*****:*****@"D:\гуманитарий с дипломом менеджера.jpg"); //ReadFoto(bdb); } } }
private static BerkeleyDb CreateDb(BerkeleyDbFlags flags) { var client = new HttpClient(); client.BaseAddress = serviceRootUri; var methods = new BerkeleyDbWebApiMethods(client, new Newtonsoft.Json.JsonSerializer(), new System.Net.Http.Formatting.JsonMediaTypeFormatter()); var bdb = new BerkeleyDb(methods, BerkeleyDbType.DB_BTREE, flags); String fileName = Path.Combine(Path.GetTempPath(), "test.bdb"); File.Delete(fileName); BerkeleyError error = bdb.OpenAsync(fileName, BerkeleyDbOpenFlags.DB_CREATE).Result; error.ThrowIfError(); return bdb; }