<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
<!-- Opt-in/out repo features -->
<UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers>
- <!-- TODO: Remove when nullability changes are finalized: https://github.com/dotnet/runtime/pull/32090 -->
- <MicrosoftNetCompilersToolsetVersion>3.5.0-beta2-20074-05</MicrosoftNetCompilersToolsetVersion>
<UsingToolIbcOptimization>true</UsingToolIbcOptimization>
<UsingToolXliff>false</UsingToolXliff>
<!-- Paths used during restore -->
public static System.Version Version { get { throw null; } }
public static long WorkingSet { get { throw null; } }
[System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute]
- public static void Exit(int exitCode) { }
+ public static void Exit(int exitCode) { throw null; }
public static string ExpandEnvironmentVariables(string name) { throw null; }
[System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute]
- public static void FailFast(string? message) { }
+ public static void FailFast(string? message) { throw null; }
[System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute]
- public static void FailFast(string? message, System.Exception? exception) { }
+ public static void FailFast(string? message, System.Exception? exception) { throw null; }
public static string[] GetCommandLineArgs() { throw null; }
public static string? GetEnvironmentVariable(string variable) { throw null; }
public static string? GetEnvironmentVariable(string variable, System.EnvironmentVariableTarget target) { throw null; }
// Fast path that avoids validation and extra indirection.
for (; index < array.Length; index++)
{
- elementConverter.Write(writer, array[index], options);
+ // TODO: https://github.com/dotnet/runtime/issues/32523
+ elementConverter.Write(writer, array[index]!, options);
}
}
else
}
else
{
- value = default!;
+ value = default;
return false;
}
}
// Read the key name.
if (!reader.Read())
{
- value = default!;
+ value = default;
return false;
}
}
if (!SingleValueReadWithReadAhead(elementConverter.ClassType, ref reader, ref state))
{
- value = default!;
+ value = default;
return false;
}
}
bool success = elementConverter.TryRead(ref reader, typeof(TValue), options, ref state, out TValue element);
if (!success)
{
- value = default!;
+ value = default;
return false;
}
{
string key = GetKeyName(enumerator.Current.Key, ref state, options);
writer.WritePropertyName(key);
- converter.Write(writer, enumerator.Current.Value, options);
+ // TODO: https://github.com/dotnet/runtime/issues/32523
+ converter.Write(writer, enumerator.Current.Value!, options);
} while (enumerator.MoveNext());
}
else
}
else
{
- value = default!;
+ value = default;
return false;
}
}
if (!SingleValueReadWithReadAhead(elementConverter.ClassType, ref reader, ref state))
{
- value = default!;
+ value = default;
return false;
}
}
// Get the value from the converter and add it.
if (!elementConverter.TryRead(ref reader, typeof(TElement), options, ref state, out TElement element))
{
- value = default!;
+ value = default;
return false;
}
{
if (!reader.Read())
{
- value = default!;
+ value = default;
return false;
}
// Fast path that avoids validation and extra indirection.
for (; index < list.Count; index++)
{
- elementConverter.Write(writer, list[index], options);
+ // TODO: https://github.com/dotnet/runtime/issues/32523
+ elementConverter.Write(writer, list[index]!, options);
}
}
else
}
else
{
- value = default!;
+ value = default;
return false;
}
}
{
// The read-ahead functionality will do the Read().
state.Current.ReturnValue = obj;
- value = default!;
+ value = default;
return false;
}
}
if (!reader.TrySkip())
{
state.Current.ReturnValue = obj;
- value = default!;
+ value = default;
return false;
}
if (!SingleValueReadWithReadAhead(jsonPropertyInfo.ConverterBase.ClassType, ref reader, ref state))
{
state.Current.ReturnValue = obj;
- value = default!;
+ value = default;
return false;
}
}
if (!SingleValueReadWithReadAhead(ClassType.Value, ref reader, ref state))
{
state.Current.ReturnValue = obj;
- value = default!;
+ value = default;
return false;
}
}
if (!jsonPropertyInfo.ReadJsonAndSetMember(obj, ref state, ref reader))
{
state.Current.ReturnValue = obj;
- value = default!;
+ value = default;
return false;
}
}
{
// No need to set 'value' here since JsonElement must be read in full.
state.Current.ReturnValue = obj;
- value = default!;
+ value = default;
return false;
}
}
// Provide a default implementation for value converters.
internal virtual bool OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, ref WriteStack state)
{
- Write(writer, value, options);
+ // TODO: https://github.com/dotnet/runtime/issues/32523
+ Write(writer, value!, options);
return true;
}
int originalPropertyDepth = writer.CurrentDepth;
- Write(writer, value, options);
+ // TODO: https://github.com/dotnet/runtime/issues/32523
+ Write(writer, value!, options);
VerifyWrite(originalPropertyDepth, writer);
return true;
{
if (!IgnoreNullValues)
{
- TTypeToConvert value = default!;
- Set!(obj, value);
+ TTypeToConvert value = default;
+ Set!(obj, value!);
}
success = true;