root / trunk / Pithos.IntegrationTests / ObjectUtil.cs @ 5d80d038
History | View | Annotate | Download (982 Bytes)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
4 |
using System.Text; |
5 |
using Pithos.Network; |
6 |
|
7 |
namespace Pithos.IntegrationTests |
8 |
{ |
9 |
class ObjectUtil |
10 |
{ |
11 |
public string Account { get; set; } |
12 |
public string ApiKey { get; set; } |
13 |
public string Container { get; set; } |
14 |
|
15 |
public CloudFilesClient Client { get; private set; } |
16 |
|
17 |
public ObjectUtil(string account,string container,string apiKey) |
18 |
{ |
19 |
Account = account; |
20 |
Container = container; |
21 |
ApiKey = apiKey; |
22 |
Client = new CloudFilesClient(Account, ApiKey); |
23 |
} |
24 |
|
25 |
public bool ObjectExists(string name) |
26 |
{ |
27 |
var exists=Client.ObjectExists(Account, Container, name); |
28 |
return exists; |
29 |
} |
30 |
|
31 |
public bool ContainerExists(string name) |
32 |
{ |
33 |
var exists=Client.ObjectExists(Account, Container, name); |
34 |
return exists; |
35 |
} |
36 |
} |
37 |
} |