Skip to content

Commit 11aa6a0

Browse files
authored
Merge pull request #80 from pfpack/release/v1.5.1-rc.2
release/v1.5.1-rc.2
2 parents 0427358 + 7033844 commit 11aa6a0

File tree

7 files changed

+14
-10
lines changed

7 files changed

+14
-10
lines changed

src/flatcollections-array/FlatArray.Tests/FlatArray.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</PackageReference>
2828
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
2929
<PackageReference Include="PrimeFuncPack.UnitTest.Data" Version="3.1.1" />
30-
<PackageReference Include="xunit" Version="2.9.2" />
30+
<PackageReference Include="xunit" Version="2.9.3" />
3131
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0">
3232
<PrivateAssets>all</PrivateAssets>
3333
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

src/flatcollections-array/FlatArray/FlatArray.T.FlatList/FlatArray.FlatList.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ private sealed partial class FlatList : IList<T>, IReadOnlyList<T>
1313

1414
internal FlatList(int length, T[] items)
1515
{
16+
Debug.Assert(items is not null);
1617
Debug.Assert(length >= 0 && length <= items.Length);
1718

1819
this.length = length;

src/flatcollections-array/FlatArray/FlatArray.T.JsonConverter/FlatArray.JsonConverter.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#pragma warning disable IDE0290 // Use primary constructor
2-
31
using System.Text.Json;
42
using System.Text.Json.Serialization;
53

@@ -11,7 +9,7 @@ internal sealed partial class JsonConverter : JsonConverter<FlatArray<T>>
119
{
1210
private readonly JsonConverter<T> itemConverter;
1311

14-
public JsonConverter(JsonSerializerOptions options)
12+
internal JsonConverter(JsonSerializerOptions options)
1513
=>
1614
itemConverter = (JsonConverter<T>)options.GetConverter(InnerItemType.Value);
1715

src/flatcollections-array/FlatArray/FlatArray.T/InnerEmptyArray/FlatArray.InnerEmptyArray.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@ partial struct FlatArray<T>
88
private static class InnerEmptyArray
99
{
1010
// Intended for the inner use only, not to pass outside
11-
// Designed not to expose the inner state of the empty FlatArray and the Builder
11+
// Designed not to expose the inner state of the empty instances
1212

13-
internal static readonly T[] Value = new T[0];
13+
internal static T[] Value => InnerInstance.Value;
14+
15+
private static class InnerInstance
16+
{
17+
internal static readonly T[] Value = new T[default];
18+
}
1419
}
1520
}

src/flatcollections-array/FlatArray/FlatArray.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<Description>PrimeFuncPack Core.FlatArray is a core library for .NET consisting of immutable FlatArray targeted for use in functional programming.</Description>
2020
<RootNamespace>System</RootNamespace>
2121
<AssemblyName>PrimeFuncPack.Core.FlatArray</AssemblyName>
22-
<Version>1.5.1-rc.1</Version>
22+
<Version>1.5.1-rc.2</Version>
2323
</PropertyGroup>
2424

2525
<ItemGroup>

src/flatcollections-array/FlatArray/FlatArrayJsonConverterFactory/Factory.CreateConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ partial class FlatArrayJsonConverterFactory
1010
=>
1111
(JsonConverter?)Activator.CreateInstance(
1212
type: typeof(FlatArray<>.JsonConverter).MakeGenericType(typeToConvert.GetGenericArguments()[0]),
13-
bindingAttr: BindingFlags.Instance | BindingFlags.Public,
13+
bindingAttr: BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.CreateInstance,
1414
binder: null,
1515
args: [options],
1616
culture: null);

src/flatcollections/FlatCollections/FlatCollections.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<Description>PrimeFuncPack Core.FlatCollections is a set of immutable Flat collections for .NET designed for developing business applications based on functional programming.</Description>
2020
<RootNamespace>System</RootNamespace>
2121
<AssemblyName>PrimeFuncPack.Core.FlatCollections</AssemblyName>
22-
<Version>1.5.1-rc.1</Version>
22+
<Version>1.5.1-rc.2</Version>
2323
</PropertyGroup>
2424

2525
<ItemGroup>
@@ -34,7 +34,7 @@
3434
</ItemGroup>
3535

3636
<ItemGroup>
37-
<PackageReference Include="PrimeFuncPack.Core.FlatArray" Version="1.5.1-rc.1" />
37+
<PackageReference Include="PrimeFuncPack.Core.FlatArray" Version="1.5.1-rc.2" />
3838
</ItemGroup>
3939

4040
</Project>

0 commit comments

Comments
 (0)