Пример #1
0
        private void Configure(IBcdrSetting setting)
        {
            _primary = new AdxClient(setting.PrimaryAdx, "BCDR-primary-", setting.Authentication);

            _secondaries = new List <AdxClient>();

            var secondaryAdx = setting.SecondaryAdx.Split(';').Select(_ => _.Trim());

            foreach (var aSecondaryUrl in secondaryAdx)
            {
                _secondaries.Add(new AdxClient(aSecondaryUrl, "BCDR-secondary-", setting.Authentication));
            }
        }
Пример #2
0
        private async Task <IDataReader> ExecuteQuery_internal(AdxClient aADXClient, string dbName, string query, TelemetryClient telemetry, Dictionary <string, string> telemetryProperties)
        {
            var result = await aADXClient.ExecuteQueryAsync(dbName, query, telemetry);

            if (result != null)
            {
                telemetry.TrackEvent("adxSuccessfulQuery", telemetryProperties);
            }
            else
            {
                telemetry.TrackEvent("adxFailedQuery", telemetryProperties);
            }

            return(result);
        }