Dependency Injectionãã¿ã¼ã³ãç¨ããã¯ã©ã¹ã®ãã¹ãã³ã¼ããè¨è¿°ãã¦ããã¨ããInjectionãã対象ãå¢ããéãä¿®æ£ãåºç¯ã«åãã§ãã¾ãäºãããã¾ãã ãã®ã¨ããä¾åãªãã¸ã§ã¯ããæ³¨å ¥ãã¦çæããFactoryã¯ã©ã¹ãå©ç¨ãã¦ãã¹ã対象ã®ã¯ã©ã¹ãçæãããã¨ã§è§£æ±ºãã§ãã¾ãã èæ¯ æ¬¡ã®Clientã®ãããªãã¹ã対象ã®ã¯ã©ã¹ãåå¨ããã¨ãã¾ãã public class Client { private IFooServer FooServer { get; } public Client(IFooServer fooServer) { FooServer = fooServer; } public void Foo() { FooServer.FooService(); } } public interface IFooServer { void FooServic
{{#tags}}- {{label}}
{{/tags}}