public sealed class ConverterRegistry : IEnumerableReference documentation and code samples for the Firestore API class ConverterRegistry.
Registry of custom converters. This is used to avoid requiring Firestore-specific attributes on types which may be intended to be non-Firestore-specific. The registry may be specified when creating a FirestoreDb via ConverterRegistry.
Implements
IEnumerableNamespace
Google.Cloud.FirestoreAssembly
Google.Cloud.Firestore.dll
Methods
Add<T>(IFirestoreConverter<T>)
public void Add<T>(IFirestoreConverter<T> converter)Adds the given converter to the registry.
| Parameter | |
|---|---|
| Name | Description |
converter |
IFirestoreConverterThe converter to add. Must not be null. |
| Type Parameter | |
|---|---|
| Name | Description |
T |
The type that |
| Exceptions | |
|---|---|
| Type | Description |
ArgumentException |
There is already a converter in the registry for the given type. |
Add<T>(IFirestoreTypeDiscriminator<T>)
public void Add<T>(IFirestoreTypeDiscriminator<T> discriminator)Adds the given type discriminator to the registry.
| Parameter | |
|---|---|
| Name | Description |
discriminator |
IFirestoreTypeDiscriminatorThe type discriminator to add. Must not be null. |
| Type Parameter | |
|---|---|
| Name | Description |
T |
The type for which |
| Exceptions | |
|---|---|
| Type | Description |
ArgumentException |
There is already a type discriminator in the registry for the given type. |