public LegalEntityValidator(IValidatorEngine validatorEngine, IRepository repository) { Rules.Add( new ChildCollectionRule <LegalEntity, MdmId>( validatorEngine, p => p.Identifiers)); }
public SourceSystemValidator(IValidatorEngine validatorEngine, IRepository repository) { Rules.Add(new ChildCollectionRule <SourceSystem, MdmId>(validatorEngine, p => p.Identifiers)); Rules.Add(new PredicateRule <SourceSystem>(p => !string.IsNullOrWhiteSpace(p.Details.Name), "Name must not be null or an empty string")); Rules.Add(new NexusEntityExistsRule <EnergyTrading.Mdm.Contracts.SourceSystem, Mdm.SourceSystem, Mdm.SourceSystemMapping>(repository, x => x.Details.Parent, false)); Rules.Add(new ParentDiffersRule <EnergyTrading.Mdm.Contracts.SourceSystem, Mdm.SourceSystem, Mdm.SourceSystemMapping>(repository, x => x.Details.Name, x => x.Details.Parent, y => y.Name)); }
public PersonService( IValidatorEngine validatorFactory, IMappingEngine mappingEngine, IRepository repository, ISearchCache searchCache) : base(validatorFactory, mappingEngine, repository, searchCache) { }
public AbcEntityTestService( IValidatorEngine validatorEngine, IMappingEngine mappingEngine, IRepository repository, ISearchCache searchCache) : base(validatorEngine, mappingEngine, repository, searchCache) { }
public PersonValidator(IValidatorEngine validatorEngine, IRepository repository) { Rules.Add( new ChildCollectionRule <Person, MdmId>(validatorEngine, p => p.Identifiers)); Rules.Add( new PredicateRule <Person>( p => !string.IsNullOrWhiteSpace(p.Details.Surname), "Surname must not be null or an empty string")); }
protected MdmService(IValidatorEngine validatorEngine, IMappingEngine mappingEngine, IRepository repository, ISearchCache searchCache, uint version) { this.MappingEngine = mappingEngine; this.validatorEngine = validatorEngine; this.repository = repository; this.searchCache = searchCache; this.ContractVersion = version; }
public BrokerValidator(IValidatorEngine validatorEngine, IRepository repository) { Rules.Add( new ChildCollectionRule <Broker, MdmId>(validatorEngine, p => p.Identifiers)); Rules.Add( new PredicateRule <Broker>( p => !string.IsNullOrWhiteSpace(p.Details.Name), "Name must not be null or an empty string")); Rules.Add(new NexusEntityExistsRule <Broker, Party, PartyMapping>(repository, x => x.Party, true)); }
public PartyValidator(IValidatorEngine validatorEngine, IRepository repository) { Rules.Add( new ChildCollectionRule <Party, MdmId>(validatorEngine, p => p.Identifiers)); Rules.Add( new PredicateRule <Party>( p => !string.IsNullOrWhiteSpace(p.Details.Name), "Name must not be null or an empty string")); // Rules.Add(new EntityNoOverlappingRule<Party>(repository, p=>p.ToMdmKey(), p => p.Details.Name, p => p.Nexus.StartDate, p => p.Nexus.EndDate)); }
public LocationValidator(IValidatorEngine validatorEngine, IRepository repository) { Rules.Add( new ChildCollectionRule <Location, MdmId>( validatorEngine, p => p.Identifiers)); Rules.Add( new PredicateRule <Location>( p => !string.IsNullOrWhiteSpace(p.Details.Name), "Name must not be null or an empty string")); Rules.Add( new NexusEntityExistsRule <Location, MDM.Location, LocationMapping>( repository, x => x.Details.Parent, false)); Rules.Add( new ParentDiffersRule <Location, MDM.Location, LocationMapping>( repository, x => x.Details.Name, x => x.Details.Parent, y => y.Name)); }
public static void Assign(IValidatorEngine engine) { _engine = engine; }
/// <summary> /// Creates a new ChildRule. /// </summary> /// <param name="validatorEngine">Validation engine to use</param> /// <param name="accessor">Function that returns the child object to validate.</param> public ChildRule(IValidatorEngine validatorEngine, Func <TParent, TChild> accessor) { this.validatorEngine = validatorEngine; this.accessor = accessor; }
public ChildCollectionRule(IValidatorEngine validatorEngine, Func <TParent, IEnumerable <TChild> > accessor) { this.validatorEngine = validatorEngine; this.accessor = accessor; }
public MappingRequestValidator(IValidatorEngine validatorEngine, IRepository repository) { Rules.Add(new SystemExistsRule(repository)); }
protected MdmService(IValidatorEngine validatorEngine, IMappingEngine mappingEngine, IRepository repository, ISearchCache searchCache) : this(validatorEngine, mappingEngine, repository, searchCache, 0) { }
public PartyRoleCreateMappingRequestValidator(IValidatorEngine validatorEngine, IRepository repository) { this.Rules.Add( new ChildRule <CreateMappingRequest, MdmId>(validatorEngine, p => p.Mapping)); this.Rules.Add(new PartyRoleCreateMappingdNoOverlappingRule <TEntity, TMapping>(repository)); }
public CreateMappingRequestValidator(IValidatorEngine validatorEngine) { Rules.Add(new ChildRule <CreateMappingRequest, MdmId>(validatorEngine, p => p.Mapping)); }