Exemple #1
0
 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;
 }
Exemple #2
0
 // 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);
 }