コード例 #1
0
 public static AmazonProgressModel Get(Guid? id)
 {
     var currentProgress = new AmazonProgressModel();
     if (id.HasValue)
         currentProgress = ProgressBars.Keys.Contains(id.Value) ? ProgressBars[id.Value] : new AmazonProgressModel();
     return currentProgress;
 }
コード例 #2
0
 public static object GetStatus(Guid? id)
 {
     var currentProgress = new AmazonProgressModel();
     if (id.HasValue)
         currentProgress = ProgressBars.Keys.Contains(id.Value) ? ProgressBars[id.Value] : new AmazonProgressModel();
     return new
     {
        currentProgress.PercentComplete,
        Status = currentProgress.Messages.Any()?currentProgress.Messages.Last().Stage:String.Empty
     };
 }
コード例 #3
0
 private static void Set(Guid id, AmazonProgressModel progressModel)
 {
     if (ProgressBars.Keys.Contains(id))
         ProgressBars[id] = progressModel;
 }