public override string ToString()
        {
            var locales = Locales != null && Locales.Any()
                ? string.Join(",", Locales.Select(s => s.TwoLetterISOLanguageName))
                : string.Empty;
            var disabledProducers = DisabledProducers != null && DisabledProducers.Any()
                ? string.Join(",", DisabledProducers)
                : string.Empty;
            var token = !string.IsNullOrEmpty(AccessToken) && AccessToken.Length > 3
                            ? AccessToken.Substring(0, 3) + "***" + AccessToken.Substring(AccessToken.Length - 3)
                            : AccessToken;

            //var server = _useReplay
            //    ? $"Host={Host}, VirtualHost={VirtualHost}, Port={Port}, UseSsl={UseSsl}, UseApiSsl={UseApiSsl}, Username={Username}, Password={Password}, NodeId={NodeId}"
            //    : $"Host={ReplayApiBaseUrl}, VirtualHost={VirtualHost}, Port={Port}, UseSsl={UseSsl}, UseApiSsl={UseApiSsl}, Username={Username}, Password={Password}, NodeId={NodeId}";
            var sb = new StringBuilder();

            sb.Append("AccessToken=").Append(token)
            .Append(" Username="******" Password="******" NodeId=").Append(NodeId)
            .Append(" BookmakerId=").Append(_bookmakerDetails?.BookmakerId)
            .Append(" VirtualHost=").Append(_bookmakerDetails?.VirtualHost)
            .Append(" TokenExpires=").Append(_bookmakerDetails?.ExpireAt.ToShortDateString())
            .Append(" InactivitySeconds=").Append(InactivitySeconds)
            .Append(" DefaultLocale=").Append(DefaultLocale)
            .Append(" Locales=[").Append(locales).Append("]")
            .Append(" DisabledProducers=").Append(disabledProducers)
            .Append(" MaxRecoveryTime=").Append(MaxRecoveryTime)
            .Append(" Environment=").Append(Environment)
            .Append(" ExceptionHandlingStrategy=").Append(ExceptionHandlingStrategy)
            .Append(" UseReplayServer=").Append(_useReplay)
            .Append(" ApiHost=").Append(ApiHost)
            .Append(" Host=").Append(Host)
            .Append(" Port=").Append(Port)
            .Append(" UseSsl=").Append(UseSsl)
            .Append(" UseApiSsl=").Append(UseApiSsl)
            .Append(" ExceptionStrategy=").Append(ExceptionHandlingStrategy)
            .Append(" AdjustAfterAge=").Append(AdjustAfterAge)
            .Append(" HttpClientTimeout=").Append(HttpClientTimeout)
            .Append(" RecoveryHttpClientTimeout=").Append(RecoveryHttpClientTimeout);

            return(sb.ToString());
        }
Пример #2
0
        public override string ToString()
        {
            var locales = Locales != null && Locales.Any()
                ? string.Join(",", Locales.Select(s => s.TwoLetterISOLanguageName))
                : string.Empty;
            var disabledProducers = DisabledProducers != null && DisabledProducers.Any()
                ? string.Join(",", DisabledProducers)
                : string.Empty;
            var token = SdkInfo.ClearSensitiveData(AccessToken);

            var sb = new StringBuilder();

            sb.Append("AccessToken=").Append(token)
            .Append(" Username="******" Password="******" NodeId=").Append(NodeId)
            .Append(" BookmakerId=").Append(_bookmakerDetails?.BookmakerId)
            .Append(" VirtualHost=").Append(_bookmakerDetails?.VirtualHost)
            .Append(" TokenExpires=").Append(_bookmakerDetails?.ExpireAt.ToShortDateString())
            .Append(" InactivitySeconds=").Append(InactivitySeconds)
            .Append(" DefaultCulture=").Append(DefaultLocale)
            .Append(" Cultures=[").Append(locales).Append("]")
            .Append(" DisabledProducers=").Append(disabledProducers)
            .Append(" MaxRecoveryTime=").Append(MaxRecoveryTime)
            .Append(" Environment=").Append(Environment)
            .Append(" ExceptionHandlingStrategy=").Append(ExceptionHandlingStrategy)
            .Append(" UseReplayServer=").Append(_useReplay)
            .Append(" ApiHost=").Append(ApiHost)
            .Append(" Host=").Append(Host)
            .Append(" Port=").Append(Port)
            .Append(" UseSsl=").Append(UseSsl)
            .Append(" UseApiSsl=").Append(UseApiSsl)
            .Append(" ExceptionStrategy=").Append(ExceptionHandlingStrategy)
            .Append(" AdjustAfterAge=").Append(AdjustAfterAge)
            .Append(" HttpClientTimeout=").Append(HttpClientTimeout)
            .Append(" RecoveryHttpClientTimeout=").Append(RecoveryHttpClientTimeout);

            return(sb.ToString());
        }