/// <summary> /// Initializes a new instance of the <see cref="ApplicationManager"/> class. /// </summary> /// <param name="dataAccess">Provides access to the data layer.</param> /// <param name="workflowGateway">The gateway into the workflow subsystem.</param> /// <param name="entitlementProvider">The entitlement provider.</param> /// <param name="endpointCommunicator">A service endpoint communicator.</param> /// <param name="userManager">Retrieves user data.</param> /// <param name="organisationManager">Retrieves organization specific data.</param> /// <param name="securityService">Retrieves form security configurations.</param> public ApplicationManager(IDataAccess dataAccess, IWorkflowService workflowGateway, IApplicationEntitlementProvider entitlementProvider, IServiceEndpointCommunicator endpointCommunicator, UserManager userManager, OrganisationManager organisationManager, ISecurityService securityService) : base(dataAccess) { this.workflowService = workflowGateway; this.entitlementProvider = entitlementProvider; this.endpointCommunicator = endpointCommunicator; this.userManager = userManager; this.organisationManager = organisationManager; this.securityService = securityService; }
public void TestInitialize() { JsonConvert.DefaultSettings = () => new JsonSerializerSettings { Formatting = Formatting.None, Converters = new JsonConverter[] { new JsonKnownTypeConverter() } }; var container = new UnityContainer().LoadConfiguration(); this.communicator = container.Resolve<IServiceEndpointCommunicator>(); this.endpointList.Add(new ServiceEndpoint { Id = "1" }); this.endpointList.Add(new ServiceEndpoint { Id = "2" }); }
/// <summary> /// Initializes a new instance of the <see cref="ExternalDataSourceProvider"/> class. /// </summary> /// <param name="applicationManager">An application manager.</param> /// <param name="dataAccess">A data access.</param> /// <param name="communicator">A service endpoint communicator.</param> public ExternalDataSourceProvider(ApplicationManager applicationManager, IDataAccess dataAccess, IServiceEndpointCommunicator communicator) { this.applicationManager = applicationManager; this.dataAccess = dataAccess; this.communicator = communicator; }
/// <summary> /// Initializes a new instance of the <see cref="DynamicOptionSourceProvider"/> class. /// </summary> /// <param name="endpointList">A list of service endpoints.</param> /// <param name="communicator">A service endpoint communicator.</param> public DynamicOptionSourceProvider(ServiceEndpointList endpointList, IServiceEndpointCommunicator communicator) { this.endpointList = endpointList; this.communicator = communicator; }
/// <summary> /// Creates a <see cref="Microsoft.Practices.EnterpriseLibrary.Validation.Validator"/> that will /// validate <paramref name="externalRuleHandlers"/>. /// </summary> /// <param name="externalRuleHandlers">The list of external rule handlers to post data to.</param> /// <param name="endpointList">A list of all service endpoints.</param> /// <param name="endpointCommunicator">A service endpoint communicator.</param> /// <returns> /// A <see cref="Microsoft.Practices.EnterpriseLibrary.Validation.Validator"/> that will /// validate <paramref name="externalRuleHandlers"/>. /// </returns> public Validator CreateExternalValidator(ServiceEndpointUtilisationList externalRuleHandlers, ServiceEndpointList endpointList, IServiceEndpointCommunicator endpointCommunicator) { IEnumerable<Validator> validatorsList = externalRuleHandlers.Select(externalRuleHandler => new ServiceEndpointValidator(externalRuleHandler, endpointList, endpointCommunicator)); return new EntLib.AndCompositeValidator(validatorsList.ToArray()); }