コード例 #1
0
ファイル: HandlerBase.cs プロジェクト: felix1313/Shop
 public void Accept(Action action)
 {
     if (acceptor.IsAccepted(action))
     {
         notify(action);
     }
 }
コード例 #2
0
ファイル: ActionsService.cs プロジェクト: felix1313/Shop
 public static void Notify(Action action)
 {
     foreach (HandlerBase handler in Handlers)
     {
         handler.Accept(action);
     }
 }
コード例 #3
0
        protected override void notify(Action action)
        {
            Email emailPrototype = EmailCreator.CreateEmail(action);

            IEnumerable<User> dataManagers = DmtDataProvider.GetUsers().Where(u => u.Roles.Any(r => r.Name == "DataManager"));

            EmailService.SendEmailsAsync(emailPrototype, dataManagers);
        }
コード例 #4
0
ファイル: HandlerBase.cs プロジェクト: felix1313/Shop
 protected abstract void notify(Action action);
コード例 #5
0
 public bool IsAccepted(Action action)
 {
     return Acceptors.All(a => a.IsAccepted(action));
 }
コード例 #6
0
ファイル: DatabaseHandler.cs プロジェクト: felix1313/Shop
 protected override void notify(Action action)
 {
     DmtDataProvider.AddAction(action);
 }