diff --git a/src/Chr.Avro/Abstract/RecordSchemaBuilderCase.cs b/src/Chr.Avro/Abstract/RecordSchemaBuilderCase.cs index 968699b2d..633694240 100644 --- a/src/Chr.Avro/Abstract/RecordSchemaBuilderCase.cs +++ b/src/Chr.Avro/Abstract/RecordSchemaBuilderCase.cs @@ -9,10 +9,11 @@ namespace Chr.Avro.Abstract using System.Runtime.Serialization; using System.Text.RegularExpressions; using Chr.Avro.Infrastructure; + #if !NET6_0_OR_GREATER using NullabilityInfoContext = Chr.Avro.Infrastructure.NullabilityInfoContext; using NullabilityState = Chr.Avro.Infrastructure.NullabilityState; using NullabilityInfo = Chr.Avro.Infrastructure.NullabilityInfo; - + #endif /// /// Implements a case that matches any non-array or non-primitive diff --git a/src/Chr.Avro/Infrastructure/NullabilityInfo.cs b/src/Chr.Avro/Infrastructure/NullabilityInfo.cs index 379866cc0..2f4ea2401 100644 --- a/src/Chr.Avro/Infrastructure/NullabilityInfo.cs +++ b/src/Chr.Avro/Infrastructure/NullabilityInfo.cs @@ -1,3 +1,4 @@ +#if !NET6_0_OR_GREATER namespace Chr.Avro.Infrastructure { using System; @@ -70,3 +71,4 @@ internal NullabilityInfo( public NullabilityInfo[] GenericTypeArguments { get; } } } +#endif diff --git a/src/Chr.Avro/Infrastructure/NullabilityInfoContext.cs b/src/Chr.Avro/Infrastructure/NullabilityInfoContext.cs index 461a56f0e..e64d21879 100644 --- a/src/Chr.Avro/Infrastructure/NullabilityInfoContext.cs +++ b/src/Chr.Avro/Infrastructure/NullabilityInfoContext.cs @@ -1,3 +1,4 @@ +#if !NET6_0_OR_GREATER namespace Chr.Avro.Infrastructure { using System; @@ -572,3 +573,4 @@ public bool ParseNullableState(int index, ref NullabilityState state) } } } +#endif diff --git a/src/Chr.Avro/Infrastructure/NullabilityState.cs b/src/Chr.Avro/Infrastructure/NullabilityState.cs index 1f16f316d..1b83737a6 100644 --- a/src/Chr.Avro/Infrastructure/NullabilityState.cs +++ b/src/Chr.Avro/Infrastructure/NullabilityState.cs @@ -1,3 +1,4 @@ +#if !NET6_0_OR_GREATER namespace Chr.Avro.Infrastructure { /// @@ -26,3 +27,4 @@ internal enum NullabilityState Nullable, } } +#endif