/// <summary> /// Registers a custom type model provider. Custom providers can be thought of /// as plugins and used to extend FlatSharp or alter properties of the /// serialization system. Custom providers are a very advanced feature and /// shouldn't be used without extensive testing and knowledge of FlatBuffers. /// /// Use of this API almost certainly means that the binary format of FlatSharp /// will no longer be compatible with the official FlatBuffers library. /// /// ITypeModelProvider instances are evaluated in registration order. /// </summary> public void RegisterProvider(ITypeModelProvider provider) { if (provider is null) { throw new ArgumentNullException(nameof(provider)); } this.providers.Add(provider); }
/// <summary> /// Registers a custom type model provider. Custom providers can be thought of /// as plugins and used to extend FlatSharp or alter properties of the /// serialization system. Custom providers are a very advanced feature and /// shouldn't be used without extensive testing and knowledge of FlatBuffers. /// /// Use of this API almost certainly means that the binary format of FlatSharp /// will no longer be compatible with the official FlatBuffers library. /// /// ITypeModelProvider instances are evaluated in registration order. /// </summary> public void RegisterProvider(ITypeModelProvider provider) { this.providers.Add(provider); }