示例#1
0
        private static void FactoryDesignPattern()
        {
            NotifyFactory  notifyFactory = new NotifyFactory();
            INotifyService notify        = notifyFactory.Create("MAIL");

            notify.Send(new CreationalPatterns.Factory.User());
        }
        public async Task Process(Data.TargetApp item, string mailAddress)
        {
            var result = await CheckWebSite(item.Url);

            if (!result)
            {
                notifyService.Send(item, mailAddress);
            }
        }