Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Analyzer/Diagnostics/DiagnosticDescriptors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ internal static class DiagnosticDescriptors
true,
"CaeriusNet generators emit companion partial declarations and currently support only non-generic top-level types.",
HelpLinkBase + "CAERIUS006.md");
}
}
2 changes: 1 addition & 1 deletion Analyzer/GeneratorUsageAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,4 @@ private static bool TryGetNamedArgumentSyntax(
argumentSyntax = null!;
return false;
}
}
}
2 changes: 1 addition & 1 deletion Analyzer/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
global using Microsoft.CodeAnalysis;
global using Microsoft.CodeAnalysis.CSharp;
global using Microsoft.CodeAnalysis.CSharp.Syntax;
global using Microsoft.CodeAnalysis.Diagnostics;
global using Microsoft.CodeAnalysis.Diagnostics;
2 changes: 1 addition & 1 deletion Analyzer/Helpers/SqlTypeDetector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ internal static string GetSqlType(ITypeSymbol type)
}
};
}
}
}
2 changes: 1 addition & 1 deletion Analyzer/Helpers/TypeStructureValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ internal ValidationResult(

internal TypeDeclarationSyntax? PrimaryConstructorDeclaration { get; }
}
}
}
2 changes: 1 addition & 1 deletion Benchmark/Data/Generated/BenchmarkItemDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
/// of ISpMapper<BenchmarkItemDto>.MapFromDataReader().
/// </summary>
[GenerateDto]
public sealed partial record BenchmarkItemDto(int Id, Guid TraceId, string Name, decimal Price, bool IsActive);
public sealed partial record BenchmarkItemDto(int Id, Guid TraceId, string Name, decimal Price, bool IsActive);
2 changes: 1 addition & 1 deletion Benchmark/Data/Generated/BenchmarkTvpItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
/// which produces SqlDataRecord[] for streaming to SQL Server.
/// </summary>
[GenerateTvp(TvpName = "tvp_BenchmarkItem", Schema = "dbo")]
public sealed partial record BenchmarkTvpItem(int Id, string Name, decimal Price);
public sealed partial record BenchmarkTvpItem(int Id, string Name, decimal Price);
2 changes: 1 addition & 1 deletion Benchmark/Data/Generated/BenchmarkTvpItem10Col.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public sealed partial record BenchmarkTvpItem10Col(
int Quantity,
decimal Score,
string Description,
Guid TraceId);
Guid TraceId);
2 changes: 1 addition & 1 deletion Benchmark/Data/Generated/BenchmarkTvpItem5Col.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public sealed partial record BenchmarkTvpItem5Col(
string Name,
decimal Price,
bool IsActive,
DateTime CreatedDate);
DateTime CreatedDate);
2 changes: 1 addition & 1 deletion Benchmark/Data/Generated/NullableRowDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public sealed partial record NullableRowDto(
string? Name,
decimal? Price,
bool? IsActive,
DateTime? CreatedAt);
DateTime? CreatedAt);
2 changes: 1 addition & 1 deletion Benchmark/Data/Generated/WideRowDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public sealed partial record WideRowDto(
int Quantity,
decimal PriceWithTax,
decimal DiscountedPrice,
bool InStock);
bool InStock);
2 changes: 1 addition & 1 deletion Benchmark/Data/Simple/SimpleDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ public SimpleDto()
public int Id { get; set; }
public Guid Guid { get; set; }
public string Name { get; set; } = null!;
}
}
2 changes: 1 addition & 1 deletion Benchmark/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
default:
RunningBenchmarks.Run_All_Benchmarks();
break;
}
}
2 changes: 1 addition & 1 deletion Benchmark/RunningBenchmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ public static void Run_Cache_Benchmarks()
typeof(InMemoryCacheBench)
], GetConfig());
}
}
}
2 changes: 1 addition & 1 deletion Benchmark/Usings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
global using CaeriusNet.Attributes.Dto;
global using CaeriusNet.Attributes.Tvp;
global using Microsoft.Data.SqlClient;
global using Microsoft.Data.SqlClient.Server;
global using Microsoft.Data.SqlClient.Server;
2 changes: 1 addition & 1 deletion Benchmark/Workshops/BenchmarkConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ public BenchmarkConfig()
AddDiagnoser(MemoryDiagnoser.Default);
WithOptions(ConfigOptions.DisableOptimizationsValidator);
}
}
}
2 changes: 1 addition & 1 deletion Benchmark/Workshops/Benchs/Cache/FrozenCacheBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,4 @@ public FrozenDictionary<string, BenchmarkItemDto> Write_FullRebuild()
{
return _sourceEntries.ToFrozenDictionary();
}
}
}
2 changes: 1 addition & 1 deletion Benchmark/Workshops/Benchs/Cache/InMemoryCacheBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,4 @@ public int ReadWrite_GetOrCreate_WarmCache()

return hits;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ public IEnumerable<BenchmarkItemDto> Create_Array_AsEnumerable()
{
return _source.AsEnumerable();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ public ImmutableArray<BenchmarkItemDto> Create_FromSpan()
{
return ImmutableArray.Create<BenchmarkItemDto>(_source.AsSpan());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ public List<BenchmarkItemDto> Create_LinqToList()
{
return _source.ToList();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ public ReadOnlyCollection<BenchmarkItemDto> Create_LinqToList_AsReadOnly()
{
return _source.ToList().AsReadOnly();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ public List<BenchmarkItemDto> Create_ExactCapacity()
list.AddRange(_source);
return list;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ public List<BenchmarkItemDto> Create_OverextendCapacity()
list.AddRange(_source);
return list;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ public List<BenchmarkItemDto> Create_UnderCapacity()
list.AddRange(_source);
return list;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ public List<BenchmarkItemDto> Create_NoCapacity()
list.AddRange(_source);
return list;
}
}
}
2 changes: 1 addition & 1 deletion Benchmark/Workshops/Benchs/Mapping/DtoMappingBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ public BenchmarkItemDto[] Map_Via_PreAllocatedArray()
result[i] = new BenchmarkItemDto(_ids[i], _traceIds[i], _names[i], _prices[i], _isActives[i]);
return result;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ public NullableRowDto[] Map_Nullable_DTO_Upfront_Check()

return result;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ public WideRowDto[] Map_10Column_DTO_ToArray()
_categories[i], _quantities[i], _pricesWithTax[i], _discountedPrices[i], _inStocks[i]);
return result;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ public StoredProcedureParameters AddTvpParameter_TwoTvps()
.AddTvpParameter("@ExistingItems", _itemList)
.Build();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ public StoredProcedureParameters Build_WithMixedParameters()
builder.AddParameter($"@Bit{i}", i % 2 == 0, SqlDbType.Bit);
return builder.Build();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ public int Read_LinqSum()
{
return _data.Sum(item => item.Id);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ public int Read_LinqSum()
{
return _data.Sum(item => item.Id);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ public int Read_LinqSum()
{
return _data.Sum(item => item.Id);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ public int Read_LinqSum()
{
return _data.Sum(item => item.Id);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ public async Task Insert_Batched_Via_TVP_StoredProcedureCall()
cmd.Parameters.Add(tvpParam);
await cmd.ExecuteNonQueryAsync();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ public async Task<int> ExecuteSP_ColdStartConnection()
count++;
return count;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ public async Task<int> One_MultiResult_Query()

return total;
}
}
}
2 changes: 1 addition & 1 deletion Benchmark/Workshops/Benchs/SqlServer/SpExecutionBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ public async Task<int> Execute_StoredProcedure_And_Materialise()

return count;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ public async Task<int> Legacy_ScopeIdentity_TwoRoundtrips()
var result = await idCmd.ExecuteScalarAsync();
return result is DBNull or null ? -1 : (int)result;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,4 @@ public static async Task InitialiseAsync()
await cmd.ExecuteNonQueryAsync();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ public async Task<int> Manual_TvpFullRoundtrip()

return count;
}
}
}
2 changes: 1 addition & 1 deletion Benchmark/Workshops/Benchs/Tvp/TvpColumnScalingBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ public int Tvp_10_Columns()
count++;
return count;
}
}
}
2 changes: 1 addition & 1 deletion Benchmark/Workshops/Benchs/Tvp/TvpSerializationBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ public int Serialize_And_Materialize_ToArray()
var records = firstItem.MapAsSqlDataRecords(_items).ToArray();
return records.Length;
}
}
}
2 changes: 1 addition & 1 deletion Benchmark/Workshops/Benchs/Tvp/TvpVsDataTableBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ public int DataTable_FillRows_BeginLoadData()
dt.EndLoadData();
return dt.Rows.Count;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
.WithReference(caeriusNet)
.WaitFor(caeriusNet);

builder.Build().Run();
builder.Build().Run();
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.2.4"/>
<PackageReference Include="Aspire.Hosting.Redis" Version="13.2.4"/>
<PackageReference Include="Aspire.Hosting.SqlServer" Version="13.2.4"/>
<PackageReference Include="Aspire.StackExchange.Redis" Version="13.2.4"/>
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.3.2"/>
<PackageReference Include="Aspire.Hosting.Redis" Version="13.3.2"/>
<PackageReference Include="Aspire.Hosting.SqlServer" Version="13.3.2"/>
<PackageReference Include="Aspire.StackExchange.Redis" Version="13.3.2"/>
Comment on lines +14 to +17
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ο»Ώglobal using Projects;
ο»Ώglobal using Projects;
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.7"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.8"/>
<!-- Ensure the app process loads Microsoft.Data.SqlClient (align with library) -->
<PackageReference Include="Microsoft.Data.SqlClient" Version="7.0.1"/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ internal static async Task RunAsync(IUsersService users, CancellationToken ct)
$" ➀ TVP+MultiRS: {selectedUsers.Count} users matched, " +
$"{theirOrders.Count} orders returned.");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ private static void Print<T>(string label, IEnumerable<T> items)
foreach (var item in items)
System.Console.WriteLine($" {item}");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ await users.DemonstrateServerSideRollbackAsync(
$"{ex.InnerException?.Message}");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ private static void PrintArray<T>(string label, IEnumerable<T> items)
{
Print(label, items);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ private static async Task Section(string title, Func<Task> body)
System.Console.WriteLine(new string('=', 76));
await body();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
global using CaeriusNet.Telemetry;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Hosting;
global using Microsoft.Extensions.Logging;
global using Microsoft.Extensions.Logging;
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@

LoggerProvider.SetLogger(app.Services.GetRequiredService<ILogger<Program>>());

await app.RunAsync();
await app.RunAsync();
Loading
Loading