Exemple #1
0
 public Lease TryGetLease(string pathToFile, string blobSasUri)
 {
     try
     {
         if (!string.IsNullOrWhiteSpace(blobSasUri))
         {
             return(BlobLease.TryGetLease(pathToFile, blobSasUri));
         }
         else
         {
             return(FileLease.TryGetLease(pathToFile));
         }
     }
     catch (Exception e)
     {
         Console.WriteLine("Could not get the lease to " + pathToFile);
         Console.WriteLine(e.Message);
         Console.WriteLine(e.StackTrace);
         return(null);
     }
 }