Browse Source

Feature refactor core (#784)

* simplied item use of language feature

* use of object initializer

* fixed Fix whitepsace formatting on line 33, column 74, 106

* applied format
finitereality/replica-status-colors
sirh3e 6 years ago
committed by GitHub
parent
commit
6c2b0cc060
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      src/Microsoft.Tye.Core/ApplicationFactory.cs

11
src/Microsoft.Tye.Core/ApplicationFactory.cs

@ -30,17 +30,18 @@ namespace Microsoft.Tye
var rootConfig = ConfigFactory.FromFile(source); var rootConfig = ConfigFactory.FromFile(source);
rootConfig.Validate(); rootConfig.Validate();
var root = new ApplicationBuilder(source, rootConfig.Name!); var root = new ApplicationBuilder(source, rootConfig.Name!)
root.Namespace = rootConfig.Namespace; {
Namespace = rootConfig.Namespace
};
queue.Enqueue((rootConfig, new HashSet<string>())); queue.Enqueue((rootConfig, new HashSet<string>()));
while (queue.TryDequeue(out var item)) while (queue.TryDequeue(out var item))
{ {
var config = item.Item1;
// dependencies represents a set of all dependencies // dependencies represents a set of all dependencies
var dependencies = item.Item2; var (config, dependencies) = item;
if (!visited.Add(config.Source.FullName)) if (!visited.Add(config.Source.FullName))
{ {
continue; continue;

Loading…
Cancel
Save