Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AddContext< TContext >()

void System.Text.Json.JsonSerializerOptions.AddContext< TContext > ( )
inline
Type Constraints
TContext :JsonSerializerContext 
TContext :new() 

Definition at line 639 of file JsonSerializerOptions.cs.

639 : JsonSerializerContext, new()
640 {
641 if (_context != null)
642 {
643 ThrowHelper.ThrowInvalidOperationException_JsonSerializerOptionsAlreadyBoundToContext();
644 }
645 (_context = new TContext())._options = this;
646 }

References System.Text.Json.JsonSerializerOptions._context, System.Text.Json.Dictionary, and System.Text.Json.ThrowHelper.ThrowInvalidOperationException_JsonSerializerOptionsAlreadyBoundToContext().