Commit f298e0bb authored by Marc Gravell's avatar Marc Gravell

check lib dependencies before trying to connect

parent dcd8ad6e
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
using System.IO.Compression; using System.IO.Compression;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using StackExchange.Redis.Profiling; using StackExchange.Redis.Profiling;
using Pipelines.Sockets.Unofficial;
namespace StackExchange.Redis namespace StackExchange.Redis
{ {
...@@ -803,7 +804,10 @@ internal ServerEndPoint AnyConnected(ServerType serverType, uint startOffset, Re ...@@ -803,7 +804,10 @@ internal ServerEndPoint AnyConnected(ServerType serverType, uint startOffset, Re
/// <param name="configuration">The string configuration to use for this multiplexer.</param> /// <param name="configuration">The string configuration to use for this multiplexer.</param>
/// <param name="log">The <see cref="TextWriter"/> to log to.</param> /// <param name="log">The <see cref="TextWriter"/> to log to.</param>
public static Task<ConnectionMultiplexer> ConnectAsync(string configuration, TextWriter log = null) public static Task<ConnectionMultiplexer> ConnectAsync(string configuration, TextWriter log = null)
=> ConnectImplAsync(configuration, log); {
SocketConnection.AssertDependencies();
return ConnectImplAsync(configuration, log);
}
private static async Task<ConnectionMultiplexer> ConnectImplAsync(object configuration, TextWriter log = null) private static async Task<ConnectionMultiplexer> ConnectImplAsync(object configuration, TextWriter log = null)
{ {
...@@ -835,7 +839,10 @@ private static async Task<ConnectionMultiplexer> ConnectImplAsync(object configu ...@@ -835,7 +839,10 @@ private static async Task<ConnectionMultiplexer> ConnectImplAsync(object configu
/// <param name="configuration">The configuration options to use for this multiplexer.</param> /// <param name="configuration">The configuration options to use for this multiplexer.</param>
/// <param name="log">The <see cref="TextWriter"/> to log to.</param> /// <param name="log">The <see cref="TextWriter"/> to log to.</param>
public static Task<ConnectionMultiplexer> ConnectAsync(ConfigurationOptions configuration, TextWriter log = null) public static Task<ConnectionMultiplexer> ConnectAsync(ConfigurationOptions configuration, TextWriter log = null)
=> ConnectImplAsync(configuration, log); {
SocketConnection.AssertDependencies();
return ConnectImplAsync(configuration, log);
}
internal static ConfigurationOptions PrepareConfig(object configuration) internal static ConfigurationOptions PrepareConfig(object configuration)
{ {
...@@ -892,7 +899,10 @@ private static ConnectionMultiplexer CreateMultiplexer(object configuration, Tex ...@@ -892,7 +899,10 @@ private static ConnectionMultiplexer CreateMultiplexer(object configuration, Tex
/// <param name="configuration">The string configuration to use for this multiplexer.</param> /// <param name="configuration">The string configuration to use for this multiplexer.</param>
/// <param name="log">The <see cref="TextWriter"/> to log to.</param> /// <param name="log">The <see cref="TextWriter"/> to log to.</param>
public static ConnectionMultiplexer Connect(string configuration, TextWriter log = null) public static ConnectionMultiplexer Connect(string configuration, TextWriter log = null)
=> ConnectImpl(configuration, log); {
SocketConnection.AssertDependencies();
return ConnectImpl(configuration, log);
}
/// <summary> /// <summary>
/// Create a new ConnectionMultiplexer instance /// Create a new ConnectionMultiplexer instance
...@@ -900,7 +910,10 @@ public static ConnectionMultiplexer Connect(string configuration, TextWriter log ...@@ -900,7 +910,10 @@ public static ConnectionMultiplexer Connect(string configuration, TextWriter log
/// <param name="configuration">The configurtion options to use for this multiplexer.</param> /// <param name="configuration">The configurtion options to use for this multiplexer.</param>
/// <param name="log">The <see cref="TextWriter"/> to log to.</param> /// <param name="log">The <see cref="TextWriter"/> to log to.</param>
public static ConnectionMultiplexer Connect(ConfigurationOptions configuration, TextWriter log = null) public static ConnectionMultiplexer Connect(ConfigurationOptions configuration, TextWriter log = null)
=> ConnectImpl(configuration, log); {
SocketConnection.AssertDependencies();
return ConnectImpl(configuration, log);
}
private static ConnectionMultiplexer ConnectImpl(object configuration, TextWriter log) private static ConnectionMultiplexer ConnectImpl(object configuration, TextWriter log)
{ {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Pipelines.Sockets.Unofficial" Version="1.0.0" /> <PackageReference Include="Pipelines.Sockets.Unofficial" Version="1.0.5" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="4.5.0" /> <PackageReference Include="System.Diagnostics.PerformanceCounter" Version="4.5.0" />
<PackageReference Include="System.IO.Pipelines" Version="4.5.1" /> <PackageReference Include="System.IO.Pipelines" Version="4.5.1" />
<PackageReference Include="System.Threading.Channels" Version="4.5.0" /> <PackageReference Include="System.Threading.Channels" Version="4.5.0" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment