Ejemplo n.º 1
0
 private static IStorageFacade CreateStorageFacade(StorageAccountConfiguration description)
 {
     if (!string.IsNullOrWhiteSpace(description.Token))
     {
         return(StorageFacade.FromToken(
                    description.Name,
                    description.Container,
                    description.Folder,
                    description.Token));
     }
     else if (!string.IsNullOrWhiteSpace(description.TokenPath))
     {
         throw new NotImplementedException();
     }
     else if (!string.IsNullOrWhiteSpace(description.Key))
     {
         return(StorageFacade.FromKey(
                    description.Name,
                    description.Container,
                    description.Folder,
                    description.Key));
     }
     else if (!string.IsNullOrWhiteSpace(description.KeyPath))
     {
         throw new NotImplementedException();
     }
     else
     {
         throw new NotSupportedException();
     }
 }