Esempio n. 1
0
 public static IOwner FromXml(XElement element, SharpGsClient connector)
 {
     if (element == null)
         return null;
     var owner = new Owner(connector);
     owner.ID = element.Descendants("ID").Select(o => o.Value).FirstOrDefault();
     owner.DisplayName = element.Descendants("DisplayName").Select(o => o.Value).FirstOrDefault();
     return owner;
 }
Esempio n. 2
0
 public static IBucket FromXml(XElement element, SharpGsClient connector)
 {
     var bucket = new Bucket(connector)
                      {
                          Name = element.Descendants("Name").First().Value,
                          CreationDate = DateTime.Parse(element.Descendants("CreationDate").First().Value)
                      };
     return bucket;
 }
Esempio n. 3
0
 public static IObject FromXml(XElement element, SharpGsClient connector, IBucket bucket)
 {
     var obj = new GoogleObject(connector, bucket)
                   {
                       ETag = element.Descendants("ETag").Select(o => o.Value).FirstOrDefault(),
                       Key = element.Descendants("Key").Select(o => o.Value).FirstOrDefault(),
                       LastModified =
                           DateTime.Parse(
                               element.Descendants("LastModified").Select(o => o.Value).FirstOrDefault() ??
                               DateTime.MinValue.ToString()),
                       Size =
                           long.Parse(element.Descendants("Size").Select(o => o.Value).FirstOrDefault() ?? "0"),
                       StorageClass = element.Descendants("StorageClass").Select(o => o.Value).FirstOrDefault(),
                       Owner = Internal.Owner.FromXml(element.Descendants("Owner").FirstOrDefault(), connector)
                   };
     return obj;
 }
Esempio n. 4
0
 public Bucket(SharpGsClient connector)
 {
     _connector = connector;
 }
Esempio n. 5
0
 public GoogleObject(SharpGsClient connector, IBucket bucket)
 {
     _connector = connector;
     Bucket = bucket;
 }
Esempio n. 6
0
 public Query(IBucket bucket, SharpGsClient connector)
 {
     _bucket = bucket;
     _connector = connector;
 }
Esempio n. 7
0
 public Owner(SharpGsClient connector)
 {
     _connector = connector;
 }