Class PgpscnJsonContext
[JsonSourceGenerationOptions(PropertyNameCaseInsensitive = true, GenerationMode = JsonSourceGenerationMode.Default)]
[JsonSerializable(typeof(SceneData))]
[JsonSerializable(typeof(SceneMetadata))]
[JsonSerializable(typeof(CompatibilityInfo))]
[JsonSerializable(typeof(AssetsDefinition))]
[JsonSerializable(typeof(WorldDefinition))]
[JsonSerializable(typeof(SpawnPoint))]
[JsonSerializable(typeof(EntityDefinition))]
[JsonSerializable(typeof(TriggerVolume))]
[JsonSerializable(typeof(CameraDefinition))]
[JsonSerializable(typeof(RenderLayerDefinition))]
[JsonSerializable(typeof(UIElementDefinition))]
[JsonSerializable(typeof(RelativePositionDefinition))]
[JsonSerializable(typeof(ActionDefinition))]
[JsonSerializable(typeof(CommandDefinition))]
[JsonSerializable(typeof(ConditionDefinition))]
[JsonSerializable(typeof(BindingDefinition))]
[JsonSerializable(typeof(TransformDefinition))]
[JsonSerializable(typeof(MappingDefinition))]
[JsonSerializable(typeof(GradientStop))]
[JsonSerializable(typeof(RangeDefinition))]
[JsonSerializable(typeof(BindingSource))]
[JsonSerializable(typeof(Dictionary<string, string>))]
public class PgpscnJsonContext : JsonSerializerContext, IJsonTypeInfoResolver
- Inheritance
-
PgpscnJsonContext
- Implements
- Inherited Members
Constructors
PgpscnJsonContext()
public PgpscnJsonContext()
PgpscnJsonContext(JsonSerializerOptions)
Creates an instance of JsonSerializerContext and binds it with the indicated JsonSerializerOptions.
public PgpscnJsonContext(JsonSerializerOptions options)
Parameters
optionsJsonSerializerOptionsThe run time provided options for the context instance.
Properties
ActionDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ActionDefinition> ActionDefinition { get; }
Property Value
AssetsDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<AssetsDefinition> AssetsDefinition { get; }
Property Value
BindingDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<BindingDefinition> BindingDefinition { get; }
Property Value
BindingSource
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<BindingSource> BindingSource { get; }
Property Value
Boolean
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<bool> Boolean { get; }
Property Value
CameraDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CameraDefinition> CameraDefinition { get; }
Property Value
CommandDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CommandDefinition> CommandDefinition { get; }
Property Value
CompatibilityInfo
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CompatibilityInfo> CompatibilityInfo { get; }
Property Value
ConditionDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ConditionDefinition> ConditionDefinition { get; }
Property Value
Default
The default JsonSerializerContext associated with a default JsonSerializerOptions instance.
public static PgpscnJsonContext Default { get; }
Property Value
DictionaryStringObject
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Dictionary<string, object>> DictionaryStringObject { get; }
Property Value
DictionaryStringString
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Dictionary<string, string>> DictionaryStringString { get; }
Property Value
EntityDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<EntityDefinition> EntityDefinition { get; }
Property Value
GeneratedSerializerOptions
The source-generated options associated with this context.
protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }
Property Value
GradientStop
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<GradientStop> GradientStop { get; }
Property Value
Int32
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<int> Int32 { get; }
Property Value
ListActionDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<ActionDefinition>> ListActionDefinition { get; }
Property Value
ListBindingDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<BindingDefinition>> ListBindingDefinition { get; }
Property Value
ListCameraDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<CameraDefinition>> ListCameraDefinition { get; }
Property Value
ListCommandDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<CommandDefinition>> ListCommandDefinition { get; }
Property Value
ListEntityDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<EntityDefinition>> ListEntityDefinition { get; }
Property Value
ListGradientStop
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<GradientStop>> ListGradientStop { get; }
Property Value
ListObject
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<object>> ListObject { get; }
Property Value
ListRenderLayerDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<RenderLayerDefinition>> ListRenderLayerDefinition { get; }
Property Value
ListSpawnPoint
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<SpawnPoint>> ListSpawnPoint { get; }
Property Value
ListString
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<string>> ListString { get; }
Property Value
ListTriggerVolume
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<TriggerVolume>> ListTriggerVolume { get; }
Property Value
ListUIElementDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<UIElementDefinition>> ListUIElementDefinition { get; }
Property Value
MappingDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<MappingDefinition> MappingDefinition { get; }
Property Value
NullableSingle
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<float?> NullableSingle { get; }
Property Value
Object
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<object> Object { get; }
Property Value
RangeDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<RangeDefinition> RangeDefinition { get; }
Property Value
RelativePositionDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<RelativePositionDefinition> RelativePositionDefinition { get; }
Property Value
RenderLayerDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<RenderLayerDefinition> RenderLayerDefinition { get; }
Property Value
SceneData
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<SceneData> SceneData { get; }
Property Value
SceneMetadata
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<SceneMetadata> SceneMetadata { get; }
Property Value
SharedOptions
public static JsonSerializerOptions SharedOptions { get; }
Property Value
Single
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<float> Single { get; }
Property Value
SpawnPoint
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<SpawnPoint> SpawnPoint { get; }
Property Value
String
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<string> String { get; }
Property Value
TransformDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<TransformDefinition> TransformDefinition { get; }
Property Value
TriggerVolume
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<TriggerVolume> TriggerVolume { get; }
Property Value
UIElementDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<UIElementDefinition> UIElementDefinition { get; }
Property Value
Vector2
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Vector2> Vector2 { get; }
Property Value
Vector3
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<Vector3> Vector3 { get; }
Property Value
WorldDefinition
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<WorldDefinition> WorldDefinition { get; }
Property Value
Methods
CreateOptions()
public static JsonSerializerOptions CreateOptions()
Returns
GetTypeInfo(Type)
Gets metadata for the specified type.
public override JsonTypeInfo? GetTypeInfo(Type type)
Parameters
typeTypeThe type to fetch metadata for.
Returns
- JsonTypeInfo
The metadata for the specified type, or null if the context has no metadata for the type.