Skip to content

Commit

Permalink
Cleanup (#1405)
Browse files Browse the repository at this point in the history
* Cleanup script builder

* Cleanup serializer

* Cleanup options
  • Loading branch information
danielmarbach authored Feb 29, 2024
1 parent 9081c2c commit 7f6ff10
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ public SqlPersistenceOpenSessionOptions(
Metadata.Add(tenantInformation.tenantIdHeaderName, tenantInformation.tenantId);
}

Extensions.Set(new IncomingMessage(SessionId, headers ?? new Dictionary<string, string>(0),
Array.Empty<byte>()));
Extensions.Set(new IncomingMessage(SessionId, headers ?? [], Array.Empty<byte>()));
}
}
}
4 changes: 2 additions & 2 deletions src/ScriptBuilder/ScriptGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public ScriptGenerator(string assemblyPath, string destinationDirectory,
this.assemblyPath = assemblyPath;
this.overwrite = overwrite;
this.clean = clean;
this.dialectOptions = dialectOptions ?? new List<BuildSqlDialect>();
this.dialectOptions = dialectOptions ?? [];
this.logError = logError;
this.promotionFinder = promotionFinder;
this.scriptBasePath = Path.Combine(destinationDirectory, "NServiceBus.Persistence.Sql");
scriptBasePath = Path.Combine(destinationDirectory, "NServiceBus.Persistence.Sql");
}

public static void Generate(string assemblyPath, string targetDirectory,
Expand Down
6 changes: 1 addition & 5 deletions src/SqlPersistence/Serializer.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Newtonsoft.Json;
Expand All @@ -15,10 +14,7 @@ static Serializer()
{
Formatting = Formatting.Indented,
DefaultValueHandling = DefaultValueHandling.Ignore,
Converters = new List<JsonConverter>
{
new ReadOnlyMemoryConverter()
}
Converters = [new ReadOnlyMemoryConverter()]
};
JsonSerializer = JsonSerializer.Create(settings);
}
Expand Down

0 comments on commit 7f6ff10

Please sign in to comment.