Exemple #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);
 }
Exemple #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));
        }