Skip to content

Commit

Permalink
chore: naming is hard
Browse files Browse the repository at this point in the history
  • Loading branch information
NatMarchand committed May 23, 2023
1 parent 87ba55c commit 9fbe885
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 37 deletions.
24 changes: 12 additions & 12 deletions StackExchange.Exceptional.sln
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchange.Exceptional.M
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.ConsoleNetCore", "samples\Samples.ConsoleNetCore\Samples.ConsoleNetCore.csproj", "{6CE269E1-6DC9-43A4-B6B8-683CE8A19E6A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StackExchange.Exceptional.MicrosoftDataSqlClient", "src\StackExchange.Exceptional.MicrosoftDataSqlClient\StackExchange.Exceptional.MicrosoftDataSqlClient.csproj", "{B575D666-06E5-4C5C-84CF-C9749C6D3E6B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchange.Exceptional.MicrosoftDataSql", "src\StackExchange.Exceptional.MicrosoftDataSql\StackExchange.Exceptional.MicrosoftDataSql.csproj", "{4FFED4CE-F0B8-4E9E-B7F9-684CA52F5D4F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StackExchange.Exceptional.SystemDataSqlClient", "src\StackExchange.Exceptional.SystemDataSqlClient\StackExchange.Exceptional.SystemDataSqlClient.csproj", "{DF5184E1-D8FF-4C29-BF87-991596FE30A7}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchange.Exceptional.SystemDataSql", "src\StackExchange.Exceptional.SystemDataSql\StackExchange.Exceptional.SystemDataSql.csproj", "{41C614C7-2932-4ECD-B592-373BAA515031}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -122,14 +122,14 @@ Global
{6CE269E1-6DC9-43A4-B6B8-683CE8A19E6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CE269E1-6DC9-43A4-B6B8-683CE8A19E6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6CE269E1-6DC9-43A4-B6B8-683CE8A19E6A}.Release|Any CPU.Build.0 = Release|Any CPU
{B575D666-06E5-4C5C-84CF-C9749C6D3E6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B575D666-06E5-4C5C-84CF-C9749C6D3E6B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B575D666-06E5-4C5C-84CF-C9749C6D3E6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B575D666-06E5-4C5C-84CF-C9749C6D3E6B}.Release|Any CPU.Build.0 = Release|Any CPU
{DF5184E1-D8FF-4C29-BF87-991596FE30A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DF5184E1-D8FF-4C29-BF87-991596FE30A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF5184E1-D8FF-4C29-BF87-991596FE30A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF5184E1-D8FF-4C29-BF87-991596FE30A7}.Release|Any CPU.Build.0 = Release|Any CPU
{4FFED4CE-F0B8-4E9E-B7F9-684CA52F5D4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FFED4CE-F0B8-4E9E-B7F9-684CA52F5D4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FFED4CE-F0B8-4E9E-B7F9-684CA52F5D4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FFED4CE-F0B8-4E9E-B7F9-684CA52F5D4F}.Release|Any CPU.Build.0 = Release|Any CPU
{41C614C7-2932-4ECD-B592-373BAA515031}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41C614C7-2932-4ECD-B592-373BAA515031}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41C614C7-2932-4ECD-B592-373BAA515031}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41C614C7-2932-4ECD-B592-373BAA515031}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -147,8 +147,8 @@ Global
{0A412433-C2CE-4EBE-BB5A-C3E48983E941} = {8B91532F-A112-4F73-80BD-A95B7359BBC3}
{8CFA59A5-5180-4466-A32E-507F3D541163} = {8B91532F-A112-4F73-80BD-A95B7359BBC3}
{6CE269E1-6DC9-43A4-B6B8-683CE8A19E6A} = {001E5AA4-42C8-4AC3-B14A-AF1DFA02E9FB}
{B575D666-06E5-4C5C-84CF-C9749C6D3E6B} = {8B91532F-A112-4F73-80BD-A95B7359BBC3}
{DF5184E1-D8FF-4C29-BF87-991596FE30A7} = {8B91532F-A112-4F73-80BD-A95B7359BBC3}
{4FFED4CE-F0B8-4E9E-B7F9-684CA52F5D4F} = {8B91532F-A112-4F73-80BD-A95B7359BBC3}
{41C614C7-2932-4ECD-B592-373BAA515031} = {8B91532F-A112-4F73-80BD-A95B7359BBC3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7F066A86-14D8-4A2C-848A-D4371BB704FA}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyName>StackExchange.Exceptional.MicrosoftDataSqlClient</AssemblyName>
<AssemblyName>StackExchange.Exceptional.MicrosoftDataSql</AssemblyName>
<Description>Microsoft.Data.SqlClient storage provider for StackExchange.Exceptional</Description>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<RootNamespace>StackExchange.Exceptional</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace StackExchange.Exceptional.Stores
/// <summary>
/// An <see cref="ErrorStore"/> implementation that uses SQL Server as its backing store.
/// </summary>
public sealed class SQLErrorStore : ErrorStore
public sealed class MicrosoftDataSQLErrorStore : ErrorStore
{
/// <summary>
/// Name for this error store.
Expand All @@ -28,12 +28,12 @@ public sealed class SQLErrorStore : ErrorStore
public const int MaximumDisplayCount = 500;

/// <summary>
/// Creates a new instance of <see cref="SQLErrorStore"/> with the specified connection string.
/// Creates a new instance of <see cref="MicrosoftDataSQLErrorStore"/> with the specified connection string.
/// The default table name is "Exceptions".
/// </summary>
/// <param name="connectionString">The database connection string to use.</param>
/// <param name="applicationName">The application name to use when logging.</param>
public SQLErrorStore(string connectionString, string applicationName)
public MicrosoftDataSQLErrorStore(string connectionString, string applicationName)
: this(new ErrorStoreSettings()
{
ApplicationName = applicationName,
Expand All @@ -42,11 +42,11 @@ public SQLErrorStore(string connectionString, string applicationName)
{ }

/// <summary>
/// Creates a new instance of <see cref="SQLErrorStore"/> with the given configuration.
/// Creates a new instance of <see cref="MicrosoftDataSQLErrorStore"/> with the given configuration.
/// The default table name is "Exceptions".
/// </summary>
/// <param name="settings">The <see cref="ErrorStoreSettings"/> for this store.</param>
public SQLErrorStore(ErrorStoreSettings settings) : base(settings)
public MicrosoftDataSQLErrorStore(ErrorStoreSettings settings) : base(settings)
{
_displayCount = Math.Min(settings.Size, MaximumDisplayCount);
_connectionString = settings.ConnectionString;
Expand Down Expand Up @@ -346,7 +346,7 @@ protected override async Task<int> GetErrorCountAsync(DateTime? since = null, st

private SqlConnection GetConnection() => new(_connectionString);

static SQLErrorStore()
static MicrosoftDataSQLErrorStore()
{
Statics.Settings.ExceptionActions
.AddHandler<SqlException>((e, se) =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyName>StackExchange.Exceptional.SystemDataSqlClient</AssemblyName>
<AssemblyName>StackExchange.Exceptional.SystemDataSql</AssemblyName>
<Description>System.Data.SqlClient storage provider for StackExchange.Exceptional</Description>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<RootNamespace>StackExchange.Exceptional</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace StackExchange.Exceptional.Stores
/// <summary>
/// An <see cref="ErrorStore"/> implementation that uses SQL Server as its backing store.
/// </summary>
public sealed class SQLErrorStore : ErrorStore
public sealed class SystemDataSQLErrorStore : ErrorStore
{
/// <summary>
/// Name for this error store.
Expand All @@ -28,12 +28,12 @@ public sealed class SQLErrorStore : ErrorStore
public const int MaximumDisplayCount = 500;

/// <summary>
/// Creates a new instance of <see cref="SQLErrorStore"/> with the specified connection string.
/// Creates a new instance of <see cref="SystemDataSQLErrorStore"/> with the specified connection string.
/// The default table name is "Exceptions".
/// </summary>
/// <param name="connectionString">The database connection string to use.</param>
/// <param name="applicationName">The application name to use when logging.</param>
public SQLErrorStore(string connectionString, string applicationName)
public SystemDataSQLErrorStore(string connectionString, string applicationName)
: this(new ErrorStoreSettings()
{
ApplicationName = applicationName,
Expand All @@ -42,11 +42,11 @@ public SQLErrorStore(string connectionString, string applicationName)
{ }

/// <summary>
/// Creates a new instance of <see cref="SQLErrorStore"/> with the given configuration.
/// Creates a new instance of <see cref="SystemDataSQLErrorStore"/> with the given configuration.
/// The default table name is "Exceptions".
/// </summary>
/// <param name="settings">The <see cref="ErrorStoreSettings"/> for this store.</param>
public SQLErrorStore(ErrorStoreSettings settings) : base(settings)
public SystemDataSQLErrorStore(ErrorStoreSettings settings) : base(settings)
{
_displayCount = Math.Min(settings.Size, MaximumDisplayCount);
_connectionString = settings.ConnectionString;
Expand Down Expand Up @@ -346,7 +346,7 @@ protected override async Task<int> GetErrorCountAsync(DateTime? since = null, st

private SqlConnection GetConnection() => new(_connectionString);

static SQLErrorStore()
static SystemDataSQLErrorStore()
{
Statics.Settings.ExceptionActions
.AddHandler<SqlException>((e, se) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ public void SQLStorage()
Assert.Equal("Server=.;Database=Local.Exceptions;Trusted_Connection=True;", settings.Store.ConnectionString);
Assert.Equal("MyExceptions", settings.Store.TableName);

Assert.IsType<SQLErrorStore>(settings.DefaultStore);
var sqlStore = settings.DefaultStore as SQLErrorStore;
Assert.IsType<MicrosoftDataSQLErrorStore>(settings.DefaultStore);
var sqlStore = settings.DefaultStore as MicrosoftDataSQLErrorStore;
Assert.Equal("Samples (ASP.NET Core SQL)", sqlStore.ApplicationName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void AppNameViaConfigure()
}

const string appName = "AppNameViaConfig";
Exceptional.Configure(settings => settings.DefaultStore = new SQLErrorStore(TestConfig.Current.SQLServerConnectionString, appName));
Exceptional.Configure(settings => settings.DefaultStore = new MicrosoftDataSQLErrorStore(TestConfig.Current.SQLServerConnectionString, appName));

Assert.Equal(appName, Exceptional.Settings.DefaultStore.ApplicationName);
Assert.Equal(appName, Statics.Settings.DefaultStore.ApplicationName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<AssemblyName>StackExchange.Exceptional.Tests</AssemblyName>
<IsTestProject Condition="'$(OS)' != 'Windows_NT' AND $(TargetFramework.StartsWith('net4'))">false</IsTestProject>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\StackExchange.Exceptional.MicrosoftDataSqlClient\StackExchange.Exceptional.MicrosoftDataSqlClient.csproj" />
<ProjectReference Include="..\..\src\StackExchange.Exceptional.Shared\StackExchange.Exceptional.Shared.csproj" />
<ProjectReference Include="..\..\src\StackExchange.Exceptional.MicrosoftDataSql\StackExchange.Exceptional.MicrosoftDataSql.csproj" />
<ProjectReference Include="..\..\src\StackExchange.Exceptional.MongoDB\StackExchange.Exceptional.MongoDB.csproj" />
<ProjectReference Include="..\..\src\StackExchange.Exceptional.MySQL\StackExchange.Exceptional.MySQL.csproj" />
<ProjectReference Include="..\..\src\StackExchange.Exceptional.PostgreSql\StackExchange.Exceptional.PostgreSql.csproj" />
<ProjectReference Include="..\..\src\StackExchange.Exceptional.MongoDB\StackExchange.Exceptional.MongoDB.csproj" />
<ProjectReference Include="..\..\src\StackExchange.Exceptional.Shared\StackExchange.Exceptional.Shared.csproj" />
<PackageReference Include="Jil" />
<PackageReference Include="xunit" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

namespace StackExchange.Exceptional.Tests.Storage
{
public class SQLErrorStoreTest : StoreBaseTest, IClassFixture<SqlFixture>
public class MicrosoftDataSQLErrorStoreTest : StoreBaseTest, IClassFixture<SqlFixture>
{
public string ConnectionString => TestConfig.Current.SQLServerConnectionString;
private SqlFixture Fixture { get; }

public SQLErrorStoreTest(SqlFixture fixture, ITestOutputHelper output) : base(output)
public MicrosoftDataSQLErrorStoreTest(SqlFixture fixture, ITestOutputHelper output) : base(output)
{
Fixture = fixture;
if (Fixture.ShouldSkip)
Expand All @@ -24,7 +24,7 @@ public SQLErrorStoreTest(SqlFixture fixture, ITestOutputHelper output) : base(ou
}

protected override ErrorStore GetStore([CallerMemberName]string appName = null) =>
new SQLErrorStore(new ErrorStoreSettings
new MicrosoftDataSQLErrorStore(new ErrorStoreSettings
{
ConnectionString = ConnectionString,
ApplicationName = appName,
Expand All @@ -35,7 +35,7 @@ protected override ErrorStore GetStore([CallerMemberName]string appName = null)
public void StoreName()
{
const string appName = "TestNameBlarghy";
var store = new SQLErrorStore("Server=.;Trusted_Connection=True;", appName);
var store = new MicrosoftDataSQLErrorStore("Server=.;Trusted_Connection=True;", appName);

Assert.Equal(appName, store.ApplicationName);
Statics.Settings = new TestSettings(store);
Expand Down

0 comments on commit 9fbe885

Please sign in to comment.