static void Main(string[] args) { IFactory factory; IComputer computer; IMobilePhone mobilePhone; Console.WriteLine("-----------microsoft----------"); factory = new MicrosoftFactory(); computer = factory.CreateComputer(); mobilePhone = factory.CreateMobilePhone(); computer.Play(); mobilePhone.Call(); Console.WriteLine("------------apple--------------"); factory = new AppleFactory(); computer = factory.CreateComputer(); mobilePhone = factory.CreateMobilePhone(); computer.Play(); mobilePhone.Call(); Console.ReadLine(); }
public Win32Helper() : this(MicrosoftFactory.CreateMicrosoft().Win32.Registry) { }