public MySqlDbContext( string connection, BackendConfiguration backendConfiguration, MetadataSource metadataSource) : base(connection, backendConfiguration, metadataSource) { }
private static void RunNewBackendTest() { var myWizard = new BackendManager.Wizard(); var newConfig = new ConfigurationManager().CreateDefaultConfiguration(); newConfig.Server = "xxx.xxx.xxx.xxx"; newConfig.Port = 3306; var superConfig = new BackendConfiguration() { DataBaseUserId = "xxxxuser", DataBaseUserPassword = "******" }; myWizard.TeardownBackend(newConfig, superConfig); myWizard.SetupNewBackend(newConfig, superConfig); var model = myWizard.ConnectWithBackend(newConfig); CreateTestModel(model); myWizard.PushDataToBackend(newConfig, model); UpdateTestModel(model); myWizard.PushDataToBackend(newConfig, model); DeleteFromTestModel(model); myWizard.LoadDataFromBackend(newConfig, model); var i = 0; }
protected override void Init(string connectionString, string cacheKey, BackendConfiguration backendConfiguration, MetadataContainer metadataContainer, Assembly callingAssembly) { base.Init(connectionString, cacheKey, backendConfiguration, metadataContainer, callingAssembly); // try and stop Sitefinity from caching everything this.LevelTwoCache.EvictAll <GigyaSitefinityModuleSettings>(); }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "mssql"; return(backend); }
static DataContext() { MetadataContainer = new DataMetadataSource().GetModel(); BackendConfiguration = new BackendConfiguration(); var connectionStringName = SiteSettings.Instance.ConnectionStringName; if (!string.IsNullOrEmpty(connectionStringName)) { ConnectionStringName = connectionStringName; } //#if DEBUG // Debug data access by logging queries //BackendConfiguration.Logging.LogEvents = LoggingLevel.Normal; //BackendConfiguration.Logging.StackTrace = true; //BackendConfiguration.Logging.EventStoreCapacity = 10000; //BackendConfiguration.Logging.MetricStoreCapacity = 3600; //BackendConfiguration.Logging.MetricStoreSnapshotInterval = 1000; //BackendConfiguration.Logging.Downloader.EventBinary = true; //BackendConfiguration.Logging.Downloader.MetricBinary = true; //BackendConfiguration.Logging.Downloader.Filename = "C:\\Temp\\DataAccess"; //BackendConfiguration.Logging.Downloader.MaxFileSizeKB = 1000; //BackendConfiguration.Logging.Downloader.NumberOfBackups = 3; //BackendConfiguration.Logging.Downloader.EventPollSeconds = 1; //BackendConfiguration.Logging.Downloader.MetricPollSeconds = 1; //#else BackendConfiguration.Logging.LogEvents = LoggingLevel.Errors; //#endif }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "Oracle"; backend.ProviderName = "Oracle.ManagedDataAccess.Client"; return backend; }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "MsSql"; backend.ProviderName = "System.Data.SqlClient"; return backend; }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "ads"; backend.ProviderName = "Advantage.Data.Provider"; return backend; }
public async Task ReadFileAsync( BackendConfiguration context, string id, Stream stream, long from, long to, long totalLength, CancellationToken cancellationToken = default(CancellationToken) ) { using (var request = Request(context, HttpMethod.Get, $"api/backend", new { id, totalLength })) { var rangeHeader = new RangeHeaderValue(from, to).ToString(); request.Headers.Add("Range", rangeHeader); Logger.LogDebug($"Range Header: {rangeHeader}"); using (var response = await Client.SendAsync( request, HttpCompletionOption.ResponseHeadersRead, cancellationToken)) { Logger.LogDebug($"Response started: Content-Length: {response.Content.Headers.ContentLength}"); response.EnsureSuccessStatusCode(); using (var responseStream = await response.Content.ReadAsStreamAsync()) await responseStream.CopyToAsync(stream, BUFFER_SIZE, cancellationToken); Logger.LogDebug($"Complete"); } } }
public async Task <bool> RequestOnlineAsync(BackendConfiguration context, string id, CancellationToken cancellationToken = default(CancellationToken)) { using (var request = Request(context, HttpMethod.Post, $"api/backend/online", new { id })) using (var response = await Client.SendAsync(request, cancellationToken)) response.EnsureSuccessStatusCode(); return(true); }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "Oracle"; backend.ProviderName = "Oracle.DataAccess.Client"; return(backend); }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "mysql"; backend.ProviderName = "MySql.Data.MySqlClient"; return backend; }
private static BackendConfiguration GetBackendConfiguration() { var backendConfig = new BackendConfiguration(); backendConfig.Backend = "MySql"; backendConfig.ProviderName = "MySql.Data.MySqlClient"; return(backendConfig); }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "MySql"; backend.ProviderName = "MySql.Data.MySqlClient"; return(backend); }
public static BackendConfiguration GetBackendConfiguration() { var backend = new BackendConfiguration { Backend = "MsSql", ProviderName = "System.Data.SqlClient" }; backend.Logging.MetricStoreSnapshotInterval = 0; backend.Runtime.SupportConcurrentThreadsInScope = true; return backend; }
public UploaderManager(ILogger <UploaderManager> logger, IOptions <AppsettingsModel> config, IElasticsearchRepository elasticsearchRepository, MinioClient minioClient) { this.logger = logger; this.configuration = config.Value.Minio; this.eslasticRepository = elasticsearchRepository; this.minioClient = minioClient; }
public static BackendConfiguration GetBackendConfiguration() { var backend = new BackendConfiguration { Backend = "MySql", ProviderName = "MySql.Data.MySqlClient" }; CustomizeBackendConfiguration(ref backend); return backend; }
public Model.ModelContainer ConnectWithBackend(BackendConfiguration config) { var model = new Model.ModelContainer(); UpdateTableSchema(model, config); return(model); }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "MsSql"; backend.ProviderName = "System.Data.SqlClient"; backend.Logging.MetricStoreSnapshotInterval = 0; return(backend); }
private static BackendConfiguration GetBackEndConfig() { var config = new BackendConfiguration(); config.Backend = "MySql"; config.ProviderName = "MySql.Data.MySqlClient"; return config; }
public async Task <FileBackendConstants.OnlineStatus> GetOnlineStatusAsync(BackendConfiguration context, string id, CancellationToken cancellationToken = default(CancellationToken)) { using (var request = Request(context, HttpMethod.Get, $"api/backend/online", new { id })) using (var response = await Client.SendAsync(request, cancellationToken)) { response.EnsureSuccessStatusCode(); return(await ReadAsJsonObjectAsync <FileBackendConstants.OnlineStatus>(response)); } }
public static BackendConfiguration GetBackendConfiguration() { var backendConfig = new BackendConfiguration() { Backend = "MsSql", ProviderName = "System.Data.SqlClient", }; return backendConfig; }
public static BackendConfiguration GetBackendConfiguration() { var backend = new BackendConfiguration { Backend = "MySql", ProviderName = "MySql.Data.MySqlClient" }; CustomizeBackendConfiguration(ref backend); return(backend); }
public async Task <bool> CheckHealthAsync(BackendConfiguration context) { using (var request = Request(context, HttpMethod.Delete, $"api/healthcheck")) using (var response = await Client.SendAsync(request)) { response.EnsureSuccessStatusCode(); } return(true); }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "MySql"; backend.ProviderName = "MySql.Data.MySqlClient"; backend.Logging.LogEventsToTrace = false; backend.Logging.MetricStoreSnapshotInterval = 0; return(backend); }
private BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "MsSql"; backend.ProviderName = "System.Data.SqlClient"; return(backend); }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "SQLite"; backend.ProviderName = "System.Data.SQLite"; CustomizeBackendConfiguration(ref backend); return backend; }
public static BackendConfiguration GetBackendConfiguration() { var configuration = new BackendConfiguration { Backend = "MySql", ProviderName = "MySql.Data.MySqlClient" }; return(configuration); }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "MsSql"; backend.ProviderName = "System.Data.SqlClient"; backend.Runtime.CacheReferenceType = CacheReferenceType.Auto; return(backend); }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "MsSql"; backend.ProviderName = "System.Data.SqlClient"; backend.Logging.MetricStoreSnapshotInterval = 0; CustomizeBackendConfiguration(ref backend); return backend; }
private static BackendConfiguration ReadBackendConfiguration() { string configName = Configuration.ReadSettings(Constants.BackendConfigurationName) ?? Constants.DefaultBackendConfigurationName; BackendConfiguration result = new BackendConfiguration { Backend = "mssql", ProviderName = "System.Data.SqlClient" }; BackendConfiguration.MergeBackendConfigurationFromConfigFile(result, ConfigurationMergeMode.ConfigFileDefinitionWins, configName); return(result); }
public static BackendConfiguration GetBackendConfiguration(BackendProvider backendProvider = null) { if (backendProvider != null) { var backend = new BackendConfiguration(); backend.Backend = backendProvider.BackendString; backend.ProviderName = backendProvider.ProviderName; return(backend); } return(null); }
public async Task <Dictionary <string, string> > GetTagsAsync(BackendConfiguration context, string id, CancellationToken cancellationToken = default(CancellationToken)) { using (var request = Request(context, HttpMethod.Get, $"api/backend/tag", new { id })) { using (var response = await Client.SendAsync(request, cancellationToken)) { response.EnsureSuccessStatusCode(); return(await ReadAsJsonObjectAsync <Dictionary <string, string> >(response)); } } }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "MsSql"; backend.ProviderName = "System.Data.SqlClient"; CustomizeBackendConfiguration(ref backend); return(backend); }
public static BackendConfiguration GetAzureBackendConfiguration() { var backend = new BackendConfiguration { Backend = "Azure", ProviderName = "System.Data.SqlClient" }; backend.Logging.MetricStoreSnapshotInterval = 0; return(backend); }
public async Task <bool> SetTagsAsync(BackendConfiguration context, string id, Dictionary <string, string> tags, CancellationToken cancellationToken = default(CancellationToken)) { using (var request = Request(context, HttpMethod.Post, $"api/backend/tag", new { id })) { request.Content = JsonContent(tags); using (var response = await Client.SendAsync(request, cancellationToken)) response.EnsureSuccessStatusCode(); } return(true); }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "MsSql"; backend.ProviderName = "System.Data.SqlClient"; backend.Logging.MetricStoreSnapshotInterval = 0; backend.ConnectionPool.IsolationLevel = IsolationLevel.ReadUncommitted; CustomizeBackendConfiguration(ref backend); return backend; }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "MsSql"; backend.ProviderName = "System.Data.SqlClient"; backend.Logging.LogEvents = LoggingLevel.Verbose; backend.Logging.StackTrace = true; backend.Logging.EventStoreCapacity = 10000; backend.Logging.MetricStoreCapacity = 3600; return(backend); }
public async Task DeleteFileAsync( BackendConfiguration context, string id, CancellationToken cancellationToken = default(CancellationToken) ) { using (var request = Request(context, HttpMethod.Delete, $"api/backend", new { id })) using (var response = await Client.SendAsync(request, cancellationToken)) { response.EnsureSuccessStatusCode(); } }
/// <summary> /// The method makes an asynchronous request of the backend configuration data. /// When the request is answered, the <see cref="OnConfigurationAvailable"/> /// callback will be called. /// The <see cref="BackendConfiguration"/> is cached in order to improve subsequent calls. /// To clear cached configuration use the <see cref="ClearBackendConfig"/> method. /// </summary> /// <param name="onConfigurationAvailable">The callback called when the configuration is available</param> public void RequestBackendConfig(OnConfigurationAvailable onConfigurationAvailable) { if (_backendConfig != null) { onConfigurationAvailable(_backendConfig); return; } // Request UnityWebRequest www; // Check if other config request is running if (_backendConfigRequest != null) { www = _backendConfigRequest.webRequest; } else { www = UnityWebRequest.Get(server + "/api/backend/configuration"); _backendConfigRequest = www.SendWebRequest(); } _backendConfigRequest.completed += (_) => { _backendConfigRequest = null; #if UNITY_EDITOR if (verbose) { Debug.Log("text: " + www.downloadHandler.text); } #endif if (www.responseCode == 200) { _backendConfig = BackendConfiguration.CreateFromJSON(GetResultJSON(www.downloadHandler.text)); onConfigurationAvailable(_backendConfig); } else { string responseCodeMessage = $"Response Code: {www.responseCode}"; if (www.responseCode == 500) { responseCodeMessage += " - Internal server error."; if (!string.IsNullOrEmpty(apiTokenString)) { responseCodeMessage += "\nIf you are using simulator, consider not to use apiTokenString."; } } Debug.LogError(responseCodeMessage); throw new System.Exception(responseCodeMessage); } }; }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "MsSql"; backend.ProviderName = "System.Data.SqlClient"; backend.Logging.LogEvents = LoggingLevel.All; backend.Logging.LogEventsToSysOut = true; backend.Logging.EventStoreCapacity = 10000; backend.Logging.MetricStoreCapacity = 3600; backend.Logging.Downloader.Filename = "c:\\testrun"; backend.Logging.Downloader.EventBinary = true; backend.Logging.Downloader.MetricBinary = true; CustomizeBackendConfiguration(ref backend); return backend; }
public WorkflowDurableInstancingDataContext(string connectionString, BackendConfiguration backend, MetadataSource metadataSource) : base(connectionString, backend, metadataSource) { var schemaHandler = GetSchemaHandler(); string script = null; if (schemaHandler.DatabaseExists()) { script = schemaHandler.CreateUpdateDDLScript(null); } else { schemaHandler.CreateDatabase(); script = schemaHandler.CreateDDLScript(); } if (!String.IsNullOrEmpty(script)) { schemaHandler.ExecuteDDLScript(script); } }
static DataContext() { MetadataContainer = new DataMetadataSource().GetModel(); BackendConfiguration = new BackendConfiguration(); #if DEBUG // Debug data access by logging queries BackendConfiguration.Logging.LogEvents = LoggingLevel.Normal; BackendConfiguration.Logging.StackTrace = true; BackendConfiguration.Logging.EventStoreCapacity = 10000; BackendConfiguration.Logging.MetricStoreCapacity = 3600; BackendConfiguration.Logging.MetricStoreSnapshotInterval = 1000; BackendConfiguration.Logging.Downloader.EventBinary = true; BackendConfiguration.Logging.Downloader.MetricBinary = true; BackendConfiguration.Logging.Downloader.Filename = "C:\\Temp\\DataAccess"; BackendConfiguration.Logging.Downloader.MaxFileSizeKB = 1000; BackendConfiguration.Logging.Downloader.NumberOfBackups = 3; BackendConfiguration.Logging.Downloader.EventPollSeconds = 1; BackendConfiguration.Logging.Downloader.MetricPollSeconds = 1; #else BackendConfiguration.Logging.LogEvents = LoggingLevel.Errors; #endif }
public EntitiesModel(string connection, BackendConfiguration backendConfiguration, MetadataSource metadataSource) :base(connection, backendConfiguration, metadataSource) { }
public EntitiesModel(BackendConfiguration backendConfiguration) :base(connectionStringName, backendConfiguration, metadataSource) { }
public OpenAccessMySqlSupermarketEntityModel(BackendConfiguration backendConfiguration) :base(connectionStringName, backendConfiguration, metadataSource) { }
public OpenAccessMySqlSupermarketEntityModel(string connection, BackendConfiguration backendConfiguration, MetadataSource metadataSource) :base(connection, backendConfiguration, metadataSource) { }
public Northwind(string connection, BackendConfiguration backendConfiguration, MetadataSource metadataSource) :base(connection, backendConfiguration, metadataSource) { }
public Northwind(BackendConfiguration backendConfiguration) :base(connectionStringName, backendConfiguration, metadataSource) { }
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "mssql"; return backend; }
/// <summary> /// Allows you to customize the BackendConfiguration of EntitiesModel. /// </summary> /// <param name="config">The BackendConfiguration of EntitiesModel.</param> static partial void CustomizeBackendConfiguration(ref BackendConfiguration config);
public static BackendConfiguration GetBackendConfiguration() { BackendConfiguration backend = new BackendConfiguration(); backend.Backend = "MsSql"; backend.ProviderName = "System.Data.SqlClient"; backend.Logging.LogEvents = LoggingLevel.Normal; backend.Logging.MetricStoreSnapshotInterval = 0; backend.Logging.Downloader.Filename = "Log"; backend.Logging.Downloader.EventText = true; return backend; }
public SupermarketMySqlContext(string connection, BackendConfiguration backendConfiguration, MetadataSource metadataSource) :base(connection, backendConfiguration, metadataSource) { }
public SupermarketMySqlContext(BackendConfiguration backendConfiguration) :base(connectionStringName, backendConfiguration, metadataSource) { }
public OpenAccessMySQL(string connection, BackendConfiguration backendConfiguration, MetadataSource metadataSource) :base(connection, backendConfiguration, metadataSource) { }
public ElectronicStoreMySQLFluentModel(BackendConfiguration backendConfiguration) : base(connectionStringName, backendConfiguration, metadataSource) { }
public ElectronicStoreMySQLFluentModel(string connection, BackendConfiguration backendConfiguration, MetadataSource metadataSource) :base(connection, backendConfiguration, metadataSource) { }
public OpenAccessMySQL(BackendConfiguration backendConfiguration) :base(connectionStringName, backendConfiguration, metadataSource) { }