public static FooService Create(string s) { var foo = new FooService(); foo.Uri = new Uri(s); foo.Instance = new Foo(); foo.Service = new TcpService(); foo.Service.Initialize(foo.Uri, foo.Instance); return foo; }
// require first service, but can also handle additional ones public TestResolver(FooService first, params FooService[] additional) { this.services.Add(first); if (additional != null) this.services.AddRange(additional); }