Esempio n. 1
0
 // Version 3: using Func<T> as a factory method.
 static INotificationManager GetNotificationService_V3()
 {
     Func<IMessageService> factoryMethod = new MessageServiceFactory().GetService;
     return new NotificationManager(factoryMethod);
 }
Esempio n. 2
0
        // Version 3: using Func<T> as a factory method.
        static INotificationManager GetNotificationService_V3()
        {
            Func <IMessageService> factoryMethod = new MessageServiceFactory().GetService;

            return(new NotificationManager(factoryMethod));
        }