public ExchangeAddViewModel(IEventAggregator eventAggregator, IMdmService entityService) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>(); this.entityService = entityService; this.Exchange = new ExchangeViewModel(this.eventAggregator); }
/// <summary> /// Perform a mapping search. /// </summary> /// <typeparam name="T">Type of entity to find</typeparam> /// <param name="service">MDM service to use</param> /// <param name="systemName">System name to use</param> /// <param name="identifier">Identifier to use</param> /// <returns>Result of the search.</returns> public static IList <T> MappingSearch <T>(this IMdmService service, string systemName, string identifier = null) where T : IMdmEntity { var search = systemName.MappingSearch(identifier); return(service.Search <T>(search).HandleResponse()); }
public BrokerAddViewModel(IEventAggregator eventAggregator, IMdmService entityService) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>(); this.entityService = entityService; this.Broker = new BrokerViewModel(this.eventAggregator); }
/// <summary> /// Attempt multiple calls to the MDM service until we are successful or exhaust the retries. /// </summary> /// <typeparam name="T">Type we are returning</typeparam> /// <param name="service">MDM service to use</param> /// <param name="func">Function to invoke against MDM</param> /// <param name="logger">Action to perform on failure</param> /// <param name="retries">Number of retries, defaults to 5</param> /// <param name="sleep">Dwell time between retries, defaults to 100 ms</param> /// <returns>Result of the MDM action</returns> public static WebResponse <T> TrySearch <T>(this IMdmService service, ILogger logger, Func <WebResponse <T> > func, int retries = 5, int sleep = 100) { var response = service.TrySearch(func, logger, retries, sleep); response.LogResponse(); return(response); }
public ExchangeAddViewModel(IEventAggregator eventAggregator, IMdmService entityService) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>(); this.entityService = entityService; this.Exchange = new ExchangeViewModel(this.eventAggregator); }
public BrokerAddViewModel(IEventAggregator eventAggregator, IMdmService entityService) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>(); this.entityService = entityService; this.Broker = new BrokerViewModel(this.eventAggregator); }
public PartyAccountabilitySelectorViewModel(IEventAggregator eventAggregator, IMdmService entityService, IRegionManager regionManager) { this.eventAggregator = eventAggregator; this.entityService = entityService; this.regionManager = regionManager; this.AsOf = SystemTime.UtcNow().Date; }
public SourceSystemAddViewModel(IEventAggregator eventAggregator, IMdmService entityService) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>(); this.entityService = entityService; this.SourceSystem = new SourceSystemViewModel(this.eventAggregator); }
public SourceSystemAddViewModel(IEventAggregator eventAggregator, IMdmService entityService) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>(); this.entityService = entityService; this.SourceSystem = new SourceSystemViewModel(this.eventAggregator); }
public PartyAccountabilityAddViewModel(IEventAggregator eventAggregator, IMdmService entityService, IList<string> partyaccountabilitytypeConfiguration) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>(); this.entityService = entityService; this.PartyAccountability = new PartyAccountabilityViewModel(this.eventAggregator); this.PartyAccountabilityTypeConfiguration = partyaccountabilitytypeConfiguration; }
public PartyAccountabilityAddViewModel(IEventAggregator eventAggregator, IMdmService entityService, IList <string> partyaccountabilitytypeConfiguration) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>(); this.entityService = entityService; this.PartyAccountability = new PartyAccountabilityViewModel(this.eventAggregator); this.PartyAccountabilityTypeConfiguration = partyaccountabilitytypeConfiguration; }
public PartyAccountabilitySearchResultsViewModel( INavigationService navigationService, IEventAggregator eventAggregator, IMdmService entityService) { this.navigationService = navigationService; this.eventAggregator = eventAggregator; this.entityService = entityService; this.IsActiveChanged += this.OnIsActiveChanged; }
public ExchangeSearchResultsViewModel( INavigationService navigationService, IEventAggregator eventAggregator, IMdmService entityService) { this.navigationService = navigationService; this.eventAggregator = eventAggregator; this.entityService = entityService; this.IsActiveChanged += this.OnIsActiveChanged; }
public LegalEntityAddViewModel( IEventAggregator eventAggregator, IMdmService entityService, IList<string> partystatusConfiguration) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>(); this.entityService = entityService; this.LegalEntity = new LegalEntityViewModel(this.eventAggregator); this.PartyStatusConfiguration = partystatusConfiguration; }
public LegalEntityAddViewModel( IEventAggregator eventAggregator, IMdmService entityService, IList <string> partystatusConfiguration) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>(); this.entityService = entityService; this.LegalEntity = new LegalEntityViewModel(this.eventAggregator); this.PartyStatusConfiguration = partystatusConfiguration; }
public PartyRoleAddViewModel( IEventAggregator eventAggregator, IMdmService entityService, IList<string> partyroletypeConfiguration) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>(); this.entityService = entityService; this.PartyRole = new PartyRoleViewModel(this.eventAggregator); this.PartyRoleTypeConfiguration = partyroletypeConfiguration; }
public PersonAddViewModel( IEventAggregator eventAggregator, IMdmService entityService, IList <string> roleConfiguration) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>(); this.entityService = entityService; this.Person = new PersonViewModel(this.eventAggregator); this.RoleConfiguration = roleConfiguration; }
public PersonAddViewModel( IEventAggregator eventAggregator, IMdmService entityService, IList<string> roleConfiguration) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>(); this.entityService = entityService; this.Person = new PersonViewModel(this.eventAggregator); this.RoleConfiguration = roleConfiguration; }
public LocationAddViewModel( IEventAggregator eventAggregator, IMdmService entityService, IList <string> typeConfiguration) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>(); this.entityService = entityService; this.Location = new LocationViewModel(this.eventAggregator); this.TypeConfiguration = typeConfiguration; }
public LegalEntityEmbeddedSearchResultsViewModel( INavigationService navigationService, IEventAggregator eventAggregator, IMdmService entityService, IRegionManager regionManager) { this.navigationService = navigationService; this.eventAggregator = eventAggregator; this.entityService = entityService; this.regionManager = regionManager; this.IsActiveChanged += this.OnIsActiveChanged; }
public PartyRoleAddViewModel( IEventAggregator eventAggregator, IMdmService entityService, IList <string> partyroletypeConfiguration) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>(); this.entityService = entityService; this.PartyRole = new PartyRoleViewModel(this.eventAggregator); this.PartyRoleTypeConfiguration = partyroletypeConfiguration; }
public LocationEmbeddedSearchResultsViewModel( INavigationService navigationService, IEventAggregator eventAggregator, IMdmService entityService, IRegionManager regionManager) { this.navigationService = navigationService; this.eventAggregator = eventAggregator; this.entityService = entityService; this.regionManager = regionManager; this.IsActiveChanged += this.OnIsActiveChanged; }
public LocationAddViewModel( IEventAggregator eventAggregator, IMdmService entityService, IList<string> typeConfiguration) { this.eventAggregator = eventAggregator; this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>(); this.entityService = entityService; this.Location = new LocationViewModel(this.eventAggregator); this.TypeConfiguration = typeConfiguration; }
public BrokerEditViewModel( IEventAggregator eventAggregator, IMdmService entityService, INavigationService navigationService, IMappingService mappingService, IApplicationCommands applicationCommands) { this.navigationService = navigationService; this.mappingService = mappingService; this.applicationCommands = applicationCommands; this.eventAggregator = eventAggregator; this.entityService = entityService; this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>(); this.CanEdit = AuthorisationHelpers.HasEntityRights("Broker"); }
public BrokerEditViewModel( IEventAggregator eventAggregator, IMdmService entityService, INavigationService navigationService, IMappingService mappingService, IApplicationCommands applicationCommands) { this.navigationService = navigationService; this.mappingService = mappingService; this.applicationCommands = applicationCommands; this.eventAggregator = eventAggregator; this.entityService = entityService; this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>(); this.CanEdit = AuthorisationHelpers.HasEntityRights("Broker"); }
/// <summary> /// Attempt multiple calls to the MDM service until we are successful or exhaust the retries. /// </summary> /// <param name="service">MDM service to use</param> /// <param name="func">Function to invoke against MDM</param> /// <param name="logger">Logger to use</param> /// <param name="retries">Number of retries, defaults to 5</param> /// <param name="sleep">Dwell time between retries, defaults to 100 ms</param> /// <returns>Result of the MDM action</returns> public static WebResponse <T> Try <T>(this IMdmService service, Func <WebResponse <T> > func, ILogger logger, int retries = 5, int sleep = 100) { var response = new WebResponse <T> { IsValid = false }; var i = 0; var isServiceUnvailable = false; Fault fault = null; logger.DebugFormat("Start : IMdmService.Try<{0}>", GetTypeName(typeof(T))); while (!response.IsValid && i++ < retries) { response = func.Invoke(); if (response.Fault != null) { fault = response.Fault; // Logic to handle the Service Unavailable scenarios if (fault.IsServiceUnavailable()) { isServiceUnvailable = true; } else if (response.Code == HttpStatusCode.NotFound) { // NB NotFound is not an error under normal circumstances response.IsValid = true; } } else { isServiceUnvailable = false; } if (!response.IsValid) { Thread.Sleep(sleep); logger.Debug("Try_" + GetTypeName(typeof(T)) + ": " + response.Code); } } if (isServiceUnvailable) { logger.Error("Service Call to MDM Service has failed with the error: " + fault.Message); } response.LogResponse(); return(response); }
public SourceSystemEditCloneViewModel( IEventAggregator eventAggregator, IMdmService entityService, INavigationService navigationService, IMappingService mappingService, IApplicationCommands applicationCommands) { this.navigationService = navigationService; this.mappingService = mappingService; this.applicationCommands = applicationCommands; this.eventAggregator = eventAggregator; this.entityService = entityService; this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>(); this.CanEdit = AuthorisationHelpers.HasEntityRights("SourceSystem"); this.eventAggregator.Subscribe<MappingClonedEvent>(this.MappingCloned); }
public SourceSystemEditCloneViewModel( IEventAggregator eventAggregator, IMdmService entityService, INavigationService navigationService, IMappingService mappingService, IApplicationCommands applicationCommands) { this.navigationService = navigationService; this.mappingService = mappingService; this.applicationCommands = applicationCommands; this.eventAggregator = eventAggregator; this.entityService = entityService; this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>(); this.CanEdit = AuthorisationHelpers.HasEntityRights("SourceSystem"); this.eventAggregator.Subscribe <MappingClonedEvent>(this.MappingCloned); }
public LegalEntityEditViewModel( IEventAggregator eventAggregator, IMdmService entityService, INavigationService navigationService, IMappingService mappingService, IApplicationCommands applicationCommands, IList <string> partystatusConfiguration) { this.navigationService = navigationService; this.mappingService = mappingService; this.applicationCommands = applicationCommands; this.eventAggregator = eventAggregator; this.entityService = entityService; this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>(); this.CanEdit = AuthorisationHelpers.HasEntityRights("LegalEntity"); this.PartyStatusConfiguration = partystatusConfiguration; }
public LegalEntityEditViewModel( IEventAggregator eventAggregator, IMdmService entityService, INavigationService navigationService, IMappingService mappingService, IApplicationCommands applicationCommands, IList<string> partystatusConfiguration) { this.navigationService = navigationService; this.mappingService = mappingService; this.applicationCommands = applicationCommands; this.eventAggregator = eventAggregator; this.entityService = entityService; this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>(); this.CanEdit = AuthorisationHelpers.HasEntityRights("LegalEntity"); this.PartyStatusConfiguration = partystatusConfiguration; }
public LocationEditCloneViewModel( IEventAggregator eventAggregator, IMdmService entityService, INavigationService navigationService, IMappingService mappingService, IApplicationCommands applicationCommands, IList<string> typeConfiguration) { this.navigationService = navigationService; this.mappingService = mappingService; this.applicationCommands = applicationCommands; this.eventAggregator = eventAggregator; this.entityService = entityService; this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>(); this.CanEdit = AuthorisationHelpers.HasEntityRights("Location"); this.eventAggregator.Subscribe<MappingClonedEvent>(this.MappingCloned); this.TypeConfiguration = typeConfiguration; }
public LocationEditCloneViewModel( IEventAggregator eventAggregator, IMdmService entityService, INavigationService navigationService, IMappingService mappingService, IApplicationCommands applicationCommands, IList <string> typeConfiguration) { this.navigationService = navigationService; this.mappingService = mappingService; this.applicationCommands = applicationCommands; this.eventAggregator = eventAggregator; this.entityService = entityService; this.confirmationFromViewModelInteractionRequest = new InteractionRequest <Confirmation>(); this.CanEdit = AuthorisationHelpers.HasEntityRights("Location"); this.eventAggregator.Subscribe <MappingClonedEvent>(this.MappingCloned); this.TypeConfiguration = typeConfiguration; }
protected override void OnSetup() { base.OnSetup(); this.MdmService = this.Container.Resolve <IMdmService>(); }
/// <summary> /// Attempt multiple calls to the MDM service until we are successful or exhaust the retries. /// </summary> /// <param name="service">MDM service to use</param> /// <param name="func">Function to invoke against MDM</param> /// <param name="logger">Logger to use</param> /// <param name="retries">Number of retries, defaults to 5</param> /// <param name="sleep">Dwell time between retries, defaults to 100 ms</param> /// <returns>Result of the MDM action</returns> public static WebResponse <T> Try <T>(this IMdmService service, ILogger logger, Func <WebResponse <T> > func, int retries = 5, int sleep = 100) { return(service.Try(func, logger, retries, sleep)); }
public MdmEntitySynchronizer(IMdmService mdmService) { this.mdmService = mdmService; }
/// <summary> /// /// </summary> public EntityMappingController(IMdmService <TContract, TEntity> service, IMdmNotificationService notificationService, IServiceLocator serviceLocator) : base(service, serviceLocator) { this.notificationService = notificationService; }
/// <summary> /// Create a new instance of the <see cref="MdmModelEntityService" /> class. /// </summary> /// <param name="factory"></param> /// <param name="mdmService"></param> /// <param name="locatorService"></param> public MdmModelEntityService(IMdmModelEntityServiceFactory factory, IMdmService mdmService, IMdmEntityLocatorService locatorService) { this.factory = factory; this.mdmService = mdmService; this.entityLocatorService = locatorService; }
protected override void OnSetup() { base.OnSetup(); this.MdmService = this.Container.Resolve<IMdmService>(); }
public PersonSynchronizer(IMdmService mdmService) : base(mdmService) { }
/// <summary> /// /// </summary> public EntitySearchController(IMdmService <TContract, TEntity> service, IServiceLocator serviceLocator) : base(serviceLocator) { this.service = service; this.entityName = typeof(TContract).Name; }
public LocationSynchronizer(IMdmService mdmService) : base(mdmService) { }
/// <summary> /// /// </summary> public EntityMappingsController(IMdmService <TContract, TEntity> service, IServiceLocator serviceLocator) : base(serviceLocator) { this.service = service; }
public MdmClient(IMdmService service) { this.service = service; }