Struct SerializedMemberViewCollection
A structure to hold a collection of Serialized
Inherited Members
Namespace: Unity.Serialization.Json
Assembly: Unity.Serialization.dll
Syntax
public readonly struct SerializedMemberViewCollection : IDisposable, IEnumerable<SerializedMemberView>, IEnumerable
Remarks
This structure is not a view itself but rather a container for views.
Constructors
SerializedMemberViewCollection(Allocator)
Initializes a new instance of Serialized
Declaration
public SerializedMemberViewCollection(Allocator label)
Parameters
Type | Name | Description |
---|---|---|
Allocator | label | The memory allocator label. |
Properties
this[string]
Gets the value associated with the specified key.
Declaration
public SerializedValueView this[string name] { get; }
Parameters
Type | Name | Description |
---|---|---|
string | name | The key of the value to get. |
Property Value
Type | Description |
---|---|
Serialized |
Exceptions
Type | Condition |
---|---|
Key |
The key does not exist in the collection. |
this[FixedString128Bytes]
Gets the value associated with the specified key.
Declaration
public SerializedValueView this[FixedString128Bytes name] { get; }
Parameters
Type | Name | Description |
---|---|---|
Fixed |
name | The key of the value to get. |
Property Value
Type | Description |
---|---|
Serialized |
Exceptions
Type | Condition |
---|---|
Key |
The key does not exist in the collection. |
this[FixedString32Bytes]
Gets the value associated with the specified key.
Declaration
public SerializedValueView this[FixedString32Bytes name] { get; }
Parameters
Type | Name | Description |
---|---|---|
Fixed |
name | The key of the value to get. |
Property Value
Type | Description |
---|---|
Serialized |
Exceptions
Type | Condition |
---|---|
Key |
The key does not exist in the collection. |
this[FixedString64Bytes]
Gets the value associated with the specified key.
Declaration
public SerializedValueView this[FixedString64Bytes name] { get; }
Parameters
Type | Name | Description |
---|---|---|
Fixed |
name | The key of the value to get. |
Property Value
Type | Description |
---|---|
Serialized |
Exceptions
Type | Condition |
---|---|
Key |
The key does not exist in the collection. |
Methods
Add(SerializedMemberView)
Adds the specified Serialized
Declaration
public void Add(SerializedMemberView view)
Parameters
Type | Name | Description |
---|---|---|
Serialized |
view | The value of to add. |
Dispose()
Releases all resources used by the Serialized
Declaration
public void Dispose()
GetEnumerator()
Returns an enumerator that iterates through the Serialized
Declaration
public SerializedMemberViewCollection.Enumerator GetEnumerator()
Returns
Type | Description |
---|---|
Serialized |
A Serialized |
GetValue(string)
Gets the value associated with the specified key.
Declaration
public SerializedValueView GetValue(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The key of the value to get. |
Returns
Type | Description |
---|---|
Serialized |
The value associated with the specified key. |
GetValue<T>(T)
Gets the value associated with the specified key.
Declaration
public SerializedValueView GetValue<T>(T name) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T | name | The key of the value to get. |
Returns
Type | Description |
---|---|
Serialized |
Returns the value associated with the specified key. |
Type Parameters
Name | Description |
---|---|
T | The fixed string type. |
TryGetValue(string, out SerializedValueView)
Gets the value associated with the specified key.
Declaration
public bool TryGetValue(string name, out SerializedValueView value)
Parameters
Type | Name | Description |
---|---|---|
string | name | The key of the value to get. |
Serialized |
value | When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value. |
Returns
Type | Description |
---|---|
bool | true if the Serialized |
TryGetValue<T>(T, out SerializedValueView)
Gets the value associated with the specified key.
Declaration
public bool TryGetValue<T>(T name, out SerializedValueView value) where T : unmanaged, INativeList<byte>, IUTF8Bytes
Parameters
Type | Name | Description |
---|---|---|
T | name | The key of the value to get. |
Serialized |
value | When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value. |
Returns
Type | Description |
---|---|
bool | true if the Serialized |
Type Parameters
Name | Description |
---|---|
T | The fixed string type. |