Skip to content

Commit

Permalink
progress report update.
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-shandar committed Dec 5, 2017
1 parent 9c141ae commit 198747c
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,23 @@ public void Done<TModel>(ResourceConfig<TModel> config, double progress) where T

public void Update()
{
var x = string.Join(", ", _Set.Keys.Select(c => c.Name + " " + c.Strategy.Type));
var x = string.Join(", ", _Set.Keys.Select(c => "'" + c.Name + "' " + c.Strategy.Type));
var p = (int)(_Completed * 100.0);
_Cmdlet.WriteProgress(
new ProgressRecord(
0,
"Creating Azure resources, " + p + "%",
x == string.Empty ? " " : x)
"Creating Azure resources",
p + "%")
{
PercentComplete = p
PercentComplete = p,
CurrentOperation = x == string.Empty ? null : "Creating " + x + "."
});
}

public void Start<TModel>(ResourceConfig<TModel> config) where TModel : class
{
_Set.TryAdd(config, new Void());
_Cmdlet.WriteVerbose("Creating " + config.Name + " " + config.Strategy.Type + "...");
_Cmdlet.WriteVerbose("Creating '" + config.Name + "' " + config.Strategy.Type + "...");
Update();
}
}
Expand Down

0 comments on commit 198747c

Please sign in to comment.