コード例 #1
0
 public NotificationManager(DataNotificationLoader loader)
 {
     if (loader != null)
     {
         loaders.Add(loader);
     }
 }
コード例 #2
0
        public NotificationManager(TypeNotification type)
        {
            this.type = type;
            switch (type)
            {
            case TypeNotification.DublicatePipeNumber:
                strategyFill = new DublicateNumberFill();
                loader       = new DublicateNumberLoader(this);
                break;

            case TypeNotification.ExpiredCertificate:
                this.strategyFill = new InspectorCertificateFill();
                loader            = new InspectorCertificateLoader(this);
                break;

            case TypeNotification.WelderCertificateExpired:
                strategyFill = new WelderCertificateFill();
                loader       = new WelderCertificateLoader(this);
                break;

            case TypeNotification.DublicateLogin:
                strategyFill = new DublicateLoginFill();
                loader       = new DuplicateLoginLoader(this);
                break;

            default:
                var ex = new NotImplementedException();
                log.Error(ex.Message);
                throw ex;
                //break; // unreachable code
            }
        }
コード例 #3
0
 protected void AddLoader(DataNotificationLoader loader)
 {
     loaders.Add(loader);
 }