コード例 #1
0
 public ContractOrganizationServices(IRepositoryMongo <Organization>
                                     repository, IValidatorStrategy <ContractOrganization> validatorInstance)
 {
     _repositoryInstance = repository;
     _validatorInstance  = validatorInstance;
     _adapter            = new OrganizationToContractOrganizationAdapter();
 }
コード例 #2
0
 public DueDetailDataService(IRepositoryMongo <TermDetail> repositoryInstance, IValidatorStrategy <DueDetail>
                             validatorInstance)
 {
     _repositoryInstance = repositoryInstance;
     _validatorInstance  = validatorInstance;
     _adapter            = new OrganizationToContractOrganizationAdapter();
 }
コード例 #3
0
 protected BaseService(IRepository <TEntity> repositoryInstance, IValidatorStrategy <TModel> validator)
 {
     Repository = repositoryInstance ??
                  throw new ArgumentNullException(nameof(repositoryInstance),
                                                  "personRepositoryInstance is null.");
     _validator = validator;
 }
コード例 #4
0
 public SKZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.SK;
     this.ZipCodePatterns = new List <string>
     {
         @"^\d{3}[ ]?\d{2}$"
     };
 }
コード例 #5
0
 public RUZipCodeValidator(IValidatorStrategy strategy) : base(strategy)
 {
     this.Code            = CountryCode.RU;
     this.ZipCodePatterns = new List <string>
     {
         @"^\d{6}$"
     };
 }
コード例 #6
0
 public CXZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.CX;
     this.ZipCodePatterns = new List <string>
     {
         @"^6798$"
     };
 }
コード例 #7
0
 public MNZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.MN;
     this.ZipCodePatterns = new List <string>
     {
         @"^\d{6}$"
     };
 }
コード例 #8
0
 public PFZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.PF;
     this.ZipCodePatterns = new List <string>
     {
         @"^987\d{2}$"
     };
 }
コード例 #9
0
 public JPZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.JP;
     this.ZipCodePatterns = new List <string>
     {
         @"^\d{3}-\d{4}$"
     };
 }
コード例 #10
0
 public PTZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.PT;
     this.ZipCodePatterns = new List <string>
     {
         @"^\d{4}([\-]\d{3})?$"
     };
 }
コード例 #11
0
 public MQZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.MQ;
     this.ZipCodePatterns = new List <string>
     {
         @"^9[78]2\d{2}$"
     };
 }
コード例 #12
0
 public BHZipCodeValidator(IValidatorStrategy strategy) : base(strategy)
 {
     this.Code            = CountryCode.BH;
     this.ZipCodePatterns = new List <string>
     {
         @"^((1[0-2]|[2-9])\d{2})?$"
     };
 }
コード例 #13
0
 public MPZipCodeValidator(IValidatorStrategy strategy) : base(strategy)
 {
     this.Code            = CountryCode.MP;
     this.ZipCodePatterns = new List <string>
     {
         @"^9695[012]([ \-]\d{4})?$"
     };
 }
コード例 #14
0
 public CRZipCodeValidator(IValidatorStrategy strategy) : base(strategy)
 {
     this.Code            = CountryCode.CR;
     this.ZipCodePatterns = new List <string>
     {
         @"^\d{4,5}|\d{3}-\d{4}$"
     };
 }
コード例 #15
0
 public ASZipCodeValidator(IValidatorStrategy strategy) : base(strategy)
 {
     this.Code            = CountryCode.AS;
     this.ZipCodePatterns = new List <string>
     {
         @"^96799$"
     };
 }
コード例 #16
0
 public NGZipCodeValidator(IValidatorStrategy strategy) : base(strategy)
 {
     this.Code            = CountryCode.NG;
     this.ZipCodePatterns = new List <string>
     {
         @"^(\d{6})?$"
     };
 }
コード例 #17
0
 public IOZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.IO;
     this.ZipCodePatterns = new List <string>
     {
         @"^BBND 1ZZ$"
     };
 }
コード例 #18
0
 public GBZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.GB;
     this.ZipCodePatterns = new List <string>
     {
         @"^GIR[ ]?0AA|((AB|AL|B|BA|BB|BD|BH|BL|BN|BR|BS|BT|CA|CB|CF|CH|CM|CO|CR|CT|CV|CW|DA|DD|DE|DG|DH|DL|DN|DT|DY|E|EC|EH|EN|EX|FK|FY|G|GL|GY|GU|HA|HD|HG|HP|HR|HS|HU|HX|IG|IM|IP|IV|JE|KA|KT|KW|KY|L|LA|LD|LE|LL|LN|LS|LU|M|ME|MK|ML|N|NE|NG|NN|NP|NR|NW|OL|OX|PA|PE|PH|PL|PO|PR|RG|RH|RM|S|SA|SE|SG|SK|SL|SM|SN|SO|SP|SR|SS|ST|SW|SY|TA|TD|TF|TN|TQ|TR|TS|TW|UB|W|WA|WC|WD|WF|WN|WR|WS|WV|YO|ZE)(\d[\dA-Z]?[ ]?\d[ABD-HJLN-UW-Z]{2}))|BFPO[ ]?\d{1,4}$"
     };
 }
コード例 #19
0
 public MEZipCodeValidator(IValidatorStrategy strategy) : base(strategy)
 {
     this.Code            = CountryCode.ME;
     this.ZipCodePatterns = new List <string>
     {
         @"^8\d{4}$"
     };
 }
コード例 #20
0
 public FRZipCodeValidator(IValidatorStrategy strategy) : base(strategy)
 {
     this.Code            = CountryCode.FR;
     this.ZipCodePatterns = new List <string>
     {
         @"^\d{2}[ ]?\d{3}$"
     };
 }
コード例 #21
0
 public VIZipCodeValidator(IValidatorStrategy strategy) : base(strategy)
 {
     this.Code            = CountryCode.VI;
     this.ZipCodePatterns = new List <string>
     {
         @"^008(([0-4]\d)|(5[01]))([ \-]\d{4})?$"
     };
 }
コード例 #22
0
 public SMZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.SM;
     this.ZipCodePatterns = new List <string>
     {
         @"^4789\d$"
     };
 }
コード例 #23
0
 public MTZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.MT;
     this.ZipCodePatterns = new List <string>
     {
         @"^[A-Z]{3}[ ]?\d{2,4}$"
     };
 }
コード例 #24
0
 public NLZipCodeValidator(IValidatorStrategy strategy) : base(strategy)
 {
     this.Code            = CountryCode.NL;
     this.ZipCodePatterns = new List <string>
     {
         @"^\d{4}[ ]?[A-Z]{2}$"
     };
 }
コード例 #25
0
 public BBZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.BB;
     this.ZipCodePatterns = new List <string>
     {
         @"^(BB\d{5})?$"
     };
 }
コード例 #26
0
 public BRZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.BR;
     this.ZipCodePatterns = new List <string>
     {
         @"^\d{5}[\-]?\d{3}$"
     };
 }
コード例 #27
0
 public PNZipCodeValidator(IValidatorStrategy strategy) : base(strategy)
 {
     this.Code            = CountryCode.PN;
     this.ZipCodePatterns = new List <string>
     {
         @"^PCRN 1ZZ$"
     };
 }
コード例 #28
0
 public GGZipCodeValidator(IValidatorStrategy strategy) : base(strategy)
 {
     this.Code            = CountryCode.GG;
     this.ZipCodePatterns = new List <string>
     {
         @"^GY\d[\dA-Z]?[ ]?\d[ABD-HJLN-UW-Z]{2}$"
     };
 }
コード例 #29
0
 public VAZipCodeValidator(IValidatorStrategy <List <string>, string> strategy) : base(strategy)
 {
     this.Code            = CountryCode.VA;
     this.ZipCodePatterns = new List <string>
     {
         @"^00120$"
     };
 }
コード例 #30
0
 public PMZipCodeValidator(IValidatorStrategy strategy) : base(strategy)
 {
     this.Code            = CountryCode.PM;
     this.ZipCodePatterns = new List <string>
     {
         @"^9[78]5\d{2}$"
     };
 }
コード例 #31
0
 public void AddValidator(IValidatorStrategy validator)
 {
     validators.Add(validator);
 }