public AddressService(IContextManager contextManager, IResolveManager resolveManager, MapServiceProvider mapServiceProvider, ITranslationEntity translationManagerToVm, ITranslationViewModel translationManagerToEntity, IPublishingStatusCache publishingStatusCache, IUserOrganizationChecker userOrganizationChecker, ICacheManager cacheManager) : base(translationManagerToVm, translationManagerToEntity, publishingStatusCache, userOrganizationChecker) { this.resolveManager = resolveManager; this.mapServiceProvider = mapServiceProvider; this.contextManager = contextManager; this.typesCache = cacheManager.TypesCache; }
private void Control_UpdateOSG(object sender, EventArgs args) { if (this.DrawingModel != null) { RenderContext3D context = new RenderContext3D(); MapServiceProvider serviceProvider = new MapServiceProvider(); serviceProvider.Register <Group>(this.OsgRoot); context.ServiceProvider = serviceProvider; this.DrawingModel.Update(context); } }
public OrganizationServiceTestBase() { Logger = new Mock <ILogger <DataAccess.Services.OrganizationService> >().Object; var mapServiceProvider = new MapServiceProvider( (new Mock <IHostingEnvironment>()).Object, new ApplicationConfiguration((new Mock <IConfigurationRoot>()).Object), (new Mock <IOptions <ProxyServerSettings> >()).Object, new Mock <ILogger <MapServiceProvider> >().Object); OrganizationLogic = new OrganizationLogic(new ChannelAttachmentLogic(), new WebPageLogic(), AddressLogic); OrganizationRepoMock = new Mock <IOrganizationVersionedRepository>(); OrganizationNameRepoMock = new Mock <IOrganizationNameRepository>(); unitOfWorkMockSetup.Setup(uw => uw.CreateRepository <IOrganizationVersionedRepository>()).Returns(OrganizationRepoMock.Object); unitOfWorkMockSetup.Setup(uw => uw.CreateRepository <IRepository <OrganizationVersioned> >()).Returns(OrganizationRepoMock.Object); unitOfWorkMockSetup.Setup(uw => uw.CreateRepository <IOrganizationNameRepository>()).Returns(OrganizationNameRepoMock.Object); }
public HealthChecker(IOptions <ProxyServerSettings> proxySettings, IOptions <TestAccessUrlConfiguration> testAccessUrlConfiguration, MapServiceProvider mapServiceProvider, AnnotationServiceProvider annotationServiceProvider, IContextManager contextManager, ILogger <HealthChecker> logger) { initialized = true; this.proxySettings = proxySettings.Value; this.testAccessUrlConfiguration = testAccessUrlConfiguration.Value; this.mapServiceProvider = mapServiceProvider; this.annotationServiceProvider = annotationServiceProvider; this.contextManager = contextManager; this.logger = logger; if (!string.IsNullOrEmpty(this.proxySettings.Address) && !string.IsNullOrEmpty(this.proxySettings.Port)) { try { string address = this.proxySettings.Address.ToLower(); string httpPrefix = "http://"; string httpsPrefix = "https://"; if (address.StartsWith(httpPrefix)) { address = address.Remove(0, httpPrefix.Length); } else if (address.StartsWith(httpsPrefix)) { address = address.Remove(0, httpsPrefix.Length); } if (address.EndsWith("/")) { address = address.Remove(address.Length - 1, 1); } proxyPureAddress = address; int.TryParse(this.proxySettings.Port, out proxyPort); proxyFullUri = string.Format("{0}:{1}", this.proxySettings.Address, this.proxySettings.Port); var testProxy = new WebProxy(proxyFullUri); } catch (Exception e) { initialized = false; logger.LogError(e.Message); } } proxyConfigured = !string.IsNullOrEmpty(proxyPureAddress) && (proxyPort != 0); }
public ServiceTestBase() { VersioningManagerMock = new Mock <IVersioningManager>(); UserIdentificationMock = new Mock <IUserIdentification>(); CommonServiceMock = new Mock <ICommonServiceInternal>(); ExternalSourceRepoMock = new Mock <IExternalSourceRepository>(); unitOfWorkMockSetup.Setup(uw => uw.CreateRepository <IExternalSourceRepository>()).Returns(ExternalSourceRepoMock.Object); ConnectionRepoMock = new Mock <IServiceServiceChannelRepository>(); unitOfWorkMockSetup.Setup(uw => uw.CreateRepository <IServiceServiceChannelRepository>()).Returns(ConnectionRepoMock.Object); translationManagerMockSetup = new Mock <ITranslationEntity>(); translationManagerVModelMockSetup = new Mock <ITranslationViewModel>(); LockingManager = (new Mock <ILockingManager>()).Object; VersioningManager = VersioningManagerMock.Object; UserOrganizationChecker = (new Mock <IUserOrganizationChecker>()).Object; UserIdentification = UserIdentificationMock.Object; TranslationManagerVModel = translationManagerVModelMockSetup.Object; AddressService = (new Mock <IAddressService>()).Object; CommonService = CommonServiceMock.Object; UserInfoService = (new Mock <IUserInfoService>()).Object; UserOrganizationService = (new Mock <IUserOrganizationService>()).Object; DataUtils = new DataUtils(); ValidationManagerMock = (new Mock <IValidationManager>()).Object; PublishedId = PublishingStatusCache.Get(PublishingStatus.Published); DeletedId = PublishingStatusCache.Get(PublishingStatus.Deleted); OldPublishedId = PublishingStatusCache.Get(PublishingStatus.OldPublished); var mapServiceProviderMock = new MapServiceProvider( (new Mock <IHostingEnvironment>()).Object, new ApplicationConfiguration((new Mock <IConfigurationRoot>()).Object), (new Mock <IOptions <ProxyServerSettings> >()).Object, new Mock <ILogger <MapServiceProvider> >().Object); AddressLogic = new AddressLogic(mapServiceProviderMock); }
public AddressLogic(MapServiceProvider mapServiceProvider) { this.mapServiceProvider = mapServiceProvider; }