public LocalPathLocator( BasicConfiguration basicConfiguration, string sAppName) { m_basicConfiguration = basicConfiguration; m_applicationName = sAppName; }
/// <inheritdoc/> public LdValue DescribeConfiguration(BasicConfiguration basic) => LdValue.BuildObject() .Add("connectTimeoutMillis", _connectTimeout.TotalMilliseconds) .Add("socketTimeoutMillis", _readTimeout.TotalMilliseconds) .Add("usingProxy", DetectProxy()) .Add("usingProxyAuthenticator", DetectProxyAuth()) .Build();
protected override void Before_all_specs() { SetupDatabase(ShopGunSpecBase.Database.ShopGun, typeof(Base).Assembly); IConfiguration configuration = new BasicConfiguration(); var container = configuration.Container; _ingredientRepository = new IngredientRepository(GetNewDataContext()); _semaphoreRepository = new Repository <Semaphore>(GetNewDataContext()); _mentorRepository = new Repository <Mentor>(GetNewDataContext()); _ingredientAdviceRepository = new Repository <IngredientAdvice>(GetNewDataContext()); _ingredientAdviceDomainService = new IngredientAdviceDomainService(_ingredientRepository, _ingredientAdviceRepository, GetNewDataContext()); _mentor = MentorBuilder.BuildMentor(); _mentorRepository.Add(_mentor); _mentorRepository.Persist(); _redSemaphore = SemaphoreBuilder.BuildRedSemaphore(); _semaphoreRepository.Add(_redSemaphore); _greenSemaphore = SemaphoreBuilder.BuildGreenSemaphore(); _semaphoreRepository.Add(_greenSemaphore); _semaphoreRepository.Persist(); _ingredient = IngredientBuilder.BuildIngredient(); _ingredientRepository.Add(_ingredient); _ingredientRepository.Persist(); base.Before_each_spec(); }
/// <summary> /// Called internally by the SDK to create an implementation instance. Applications do not need /// to call this method. /// </summary> /// <param name="basicConfiguration">provides the basic SDK configuration properties</param> /// <returns>an <see cref="HttpConfiguration"/></returns> public HttpConfiguration CreateHttpConfiguration(BasicConfiguration basicConfiguration) => new HttpConfiguration( MakeHttpProperties(basicConfiguration), _messageHandler, _responseStartTimeout, _useReport );
private HttpProperties MakeHttpProperties(BasicConfiguration basic) { Func <HttpProperties, HttpMessageHandler> handlerFn; if (_messageHandler is null) { handlerFn = PlatformSpecific.Http.GetHttpMessageHandlerFactory(_connectTimeout, _proxy); } else { handlerFn = p => _messageHandler; } var httpProperties = HttpProperties.Default .WithAuthorizationKey(basic.MobileKey) .WithConnectTimeout(_connectTimeout) .WithHttpMessageHandlerFactory(handlerFn) .WithProxy(_proxy) .WithUserAgent("XamarinClient/" + AssemblyVersions.GetAssemblyVersionStringForType(typeof(LdClient))) .WithWrapper(_wrapperName, _wrapperVersion); foreach (var kv in _customHeaders) { httpProperties = httpProperties.WithHeader(kv.Key, kv.Value); } return(httpProperties); }
public OpvWebServiceFactory() { IConfiguration configuration = new BasicConfiguration(); _container = configuration.Container; Log = _container.Resolve <ILoggerFactory>().Create(GetType().FullName); }
protected WebServiceBase() { IConfiguration configuration = new BasicConfiguration(); Container = configuration.Container; Log = Container.Resolve <ILoggerFactory>().Create(GetType().FullName); }
/// <inheritdoc/> public LdValue DescribeConfiguration(BasicConfiguration basic) => LdValue.BuildObject() .WithPollingProperties( StandardEndpoints.IsCustomUri(basic.ServiceEndpoints, _baseUri, e => e.StreamingBaseUri), _pollInterval ) .Add("usingRelayDaemon", false) // this property is specific to the server-side SDK .Build();
public IConfiguration GetConfig() { var config = new BasicConfiguration(); config.AddConfigurationOption("NewName", "NewValue"); config.AddConfigurationOption("ParameterizedValue", "${NewName}"); return(config); }
public TisStrReader() { BasicConfiguration basicConfiguration = new BasicConfiguration(); m_EflowLangPath = basicConfiguration.eFlowLangPath; m_strFilesList = new SortedDictionary <string, SortedDictionary <string, string> >(); }
/// <inheritdoc/> public LdValue DescribeConfiguration(BasicConfiguration basic) => LdValue.BuildObject() .WithEventProperties( MakeEventsConfiguration(basic, false), StandardEndpoints.IsCustomUri(basic.ServiceEndpoints, _baseUri, e => e.EventsBaseUri) ) .Add("userKeysCapacity", _userKeysCapacity) // these two properties are specific to the server-side SDK .Add("userKeysFlushIntervalMillis", _userKeysFlushInterval.TotalMilliseconds) .Build();
/// <inheritdoc/> public LdValue DescribeConfiguration(BasicConfiguration basic) => LdValue.BuildObject() .WithStreamingProperties( StandardEndpoints.IsCustomUri(basic.ServiceEndpoints, _baseUri, e => e.StreamingBaseUri), false, _initialReconnectDelay ) .Set("usingRelayDaemon", false) .Build();
private void mainForm_Load(object sender, EventArgs e) { BasicConfiguration config = BasicConfiguration.FromNameValueCollection(System.Configuration.ConfigurationManager.AppSettings); DataCenterDataAccess.Config.ConnectionString = config.ConnectionString; core = new DataCenterCore(config); core.Start(); }
private StreamProcessor CreateProcessor() { var basicConfig = new BasicConfiguration(_config, TestLogger); return(_config.DataSourceFactory.CreateDataSource( new LdClientContext(basicConfig, _config), _dataSourceUpdates ) as StreamProcessor); }
/// <summary> /// Funcion llamada al iniciarse el servicio /// </summary> /// <param name="args">Parametros</param> protected override void OnStart(string[] args) { BasicConfiguration config = BasicConfiguration.FromNameValueCollection(System.Configuration.ConfigurationManager.AppSettings); DataCenterDataAccess.Config.ConnectionString = config.ConnectionString; core = new DataCenterLogic.DataCenterCore(config); core.Start(); }
public AnalyticsMonitorInstance(ApplicationType applicationType) { var config = new BasicConfiguration(); m_enableEquatechStatistics = config.EnableEquatechStatistics; if (m_enableEquatechStatistics) { m_AnalyticsMonitorHelper = new AnalyticsMonitorHelper(applicationType); } }
/// <inheritdoc/> public HttpConfiguration CreateHttpConfiguration(BasicConfiguration basicConfiguration) { var httpProperties = MakeHttpProperties(basicConfiguration); return(new HttpConfiguration( httpProperties, _messageHandler, _responseStartTimeout )); }
private void LoadData() { BasicConfiguration b = BasicConfiguration.basicConf; //textIni.Text = b.ExternalSlic3rIniFile; //textPath.Text = b.ExternalSlic3rPath; textSlic3rConfigDir.Text = b.Slic3rConfigDir; textExecutable.Text = b.Slic3rExecutable; //checkBoxUseBundledVersion.Checked = b.InternalSlic3rUseBundledVersion; }
public void HasMapReturnsTrueForMappedEntity() { // assemble var target = new BasicConfiguration(); // act var actual = target.HasMap(typeof(Post)); // assert Assert.True(actual); }
/// <inheritdoc/> public LdValue DescribeConfiguration(BasicConfiguration basic) { return(LdValue.BuildObject() .Add("streamingDisabled", false) .Add("customBaseURI", false) .Add("customStreamURI", !(_baseUri ?? DefaultBaseUri).Equals(DefaultBaseUri)) .Add("reconnectTimeMillis", _initialReconnectDelay.TotalMilliseconds) .Add("usingRelayDaemon", false) .Build()); }
private void LoadData() { BasicConfiguration b = BasicConfiguration.basicConf; //textIni.Text = b.ExternalSlic3rIniFile; //textPath.Text = b.ExternalSlic3rPath; textSlic3rConfigDir.Text = b.Slic3rConfigDir; textExecutable.Text = b.Slic3rExecutable; comboVersion.SelectedIndex = comboVersion.Items.Count - b.Slic3rVersionGroup - 1; //checkBoxUseBundledVersion.Checked = b.InternalSlic3rUseBundledVersion; }
/// <inheritdoc/> public LdValue DescribeConfiguration(BasicConfiguration basic) { return(LdValue.BuildObject() .Add("streamingDisabled", true) .Add("customBaseURI", !(_baseUri ?? DefaultBaseUri).Equals(DefaultBaseUri)) .Add("customStreamURI", false) .Add("pollingIntervalMillis", _pollInterval.TotalMilliseconds) .Add("usingRelayDaemon", false) .Build()); }
internal ServerDiagnosticStore(Configuration config, BasicConfiguration basicConfig, HttpConfiguration httpConfig) { DateTime currentTime = DateTime.Now; Config = config; BasicConfig = basicConfig; HttpConfig = httpConfig; DataSince = currentTime.ToBinary(); DiagnosticId = new DiagnosticId(config.SdkKey, Guid.NewGuid()); InitEvent = BuildInitEvent(currentTime); }
private void frmMain_Load(object sender, EventArgs e) { OutputMessageManager msgMgr = new OutputMessageManager(); msgMgr.mBasicConfiguration = BasicConfiguration.FromNameValueCollection(ConfigurationManager.AppSettings); DataCenterDataAccess.Config.ConnectionString = msgMgr.mBasicConfiguration.ConnectionString; msgMgr.Start(); msgMgr.OnMessageSentToIDE += new OutputMessageManager.MessageSentToIDE(msgMgr_OnMessageSentToIDE); }
/// <inheritdoc/> public LdValue DescribeConfiguration(BasicConfiguration basic) { if (_coreFactory != null && _coreFactory is IDiagnosticDescription dd1) { return(dd1.DescribeConfiguration(basic)); } if (_coreAsyncFactory != null && _coreAsyncFactory is IDiagnosticDescription dd2) { return(dd2.DescribeConfiguration(basic)); } return(LdValue.Of("custom")); }
protected override void CreateDatabase() { IConfiguration config = new BasicConfiguration(); var container = config.Container; DataContext context = container.Resolve <DataContext>(); if (context.DatabaseExists()) { context.DeleteDatabase(); } context.CreateDatabase(); }
public void GetMapReturnsMapForMappedEntity() { // assemble var target = new BasicConfiguration(); // act var actual = target.GetMap(typeof(Post)); // assert Assert.NotNull(actual); Assert.Equal(typeof(Post), actual.Type); }
/* private void buttonBrowseSlic3r_Click(object sender, EventArgs e) * { * if (openFileDialog.ShowDialog() == DialogResult.OK) * textPath.Text = openFileDialog.FileName; * } * * private void buttonBrowseIni_Click(object sender, EventArgs e) * { * if (openFileDialog.ShowDialog() == DialogResult.OK) * textIni.Text = openFileDialog.FileName; * * } */ private void buttonOK_Click(object sender, EventArgs e) { BasicConfiguration b = BasicConfiguration.basicConf; //b.InternalSlic3rUseBundledVersion = checkBoxUseBundledVersion.Checked; //b.ExternalSlic3rPath = textPath.Text; //b.ExternalSlic3rIniFile = textIni.Text; b.Slic3rConfigDir = textSlic3rConfigDir.Text; b.Slic3rExecutable = textExecutable.Text; Hide(); Main.slicer.Update(); Main.main.slicerPanel.UpdateSelection(); }
public LdValue DescribeConfiguration(BasicConfiguration basic) { // The difference between "offline" and "using the Relay daemon" is irrelevant from the data source's // point of view, but we describe them differently in diagnostic events. This is easy because if we were // configured to be completely offline... we wouldn't be sending any diagnostic events. Therefore, if // Components.externalUpdatesOnly() was specified as the data source and we are sending a diagnostic // event, we can assume usingRelayDaemon should be true. return(LdValue.BuildObject() .Add("customBaseURI", false) .Add("customStreamURI", false) .Add("streamingDisabled", false) .Add("usingRelayDaemon", true) .Build()); }
public async Task <BasicConfiguration> AddBasicConfigurationAsync(BasicConfigurationDto basicConfigurationDto) { var basicConfiguration = new BasicConfiguration { LevelId = basicConfigurationDto.LevelId, AccessibleFeaturesList = JsonConvert.SerializeObject(basicConfigurationDto.AccessibleFeaturesList), IsDeleted = false }; _featureRepository.AddBasicConfigurationToLevel(basicConfiguration); await _featureRepository.SaveChangesAsync(); return(basicConfiguration); }