public static IWebSocketGremlinQueryExecutorBuilder Transform( this IWebSocketGremlinQueryExecutorBuilder builder, IEnumerable <IWebSocketGremlinQueryExecutorBuilderTransformation> webSocketTransformations) { foreach (var webSocketTransformation in webSocketTransformations) { builder = webSocketTransformation.Transform(builder); } return(builder); }
public static IWebSocketGremlinQueryExecutorBuilder Configure( this IWebSocketGremlinQueryExecutorBuilder builder, IConfiguration configuration) { var authenticationSection = configuration.GetSection("Authentication"); var connectionPoolSection = configuration.GetSection("ConnectionPool"); builder = builder .At(configuration.GetRequiredConfiguration("Uri")) .ConfigureConnectionPool(connectionPoolSettings => { if (int.TryParse(connectionPoolSection[$"{nameof(ConnectionPoolSettings.MaxInProcessPerConnection)}"], out var maxInProcessPerConnection)) { connectionPoolSettings.MaxInProcessPerConnection = maxInProcessPerConnection; } if (int.TryParse(connectionPoolSection[$"{nameof(ConnectionPoolSettings.PoolSize)}"], out var poolSize)) { connectionPoolSettings.PoolSize = poolSize; } }); if (configuration["Alias"] is { } alias) { builder = builder.SetAlias(alias); } if (authenticationSection["Username"] is { } username&& authenticationSection["Password"] is { } password) { builder = builder.AuthenticateBy(username, password); } if (Enum.TryParse <SerializationFormat>(configuration[$"{nameof(SerializationFormat)}"], out var graphsonVersion)) { builder = builder.SetSerializationFormat(graphsonVersion); } return(builder); }
public IWebSocketGremlinQueryExecutorBuilder Transform(IWebSocketGremlinQueryExecutorBuilder builder) { return(_transformation(builder)); }
public CosmosDbConfigurationBuilder(IWebSocketGremlinQueryExecutorBuilder webSocketBuilder, string?collectionName = default) { _collectionName = collectionName; _webSocketBuilder = webSocketBuilder; }
public static IWebSocketGremlinQueryExecutorBuilder At(this IWebSocketGremlinQueryExecutorBuilder builder, string uri) { return(builder.At(new Uri(uri))); }
public static IWebSocketGremlinQueryExecutorBuilder AtLocalhost(this IWebSocketGremlinQueryExecutorBuilder builder) { return(builder.At(new Uri("ws://localhost:8182"))); }