@@ -10,7 +10,7 @@ namespace MongoDB.Bson.Serialization
10
10
/// <summary>
11
11
/// //TODO
12
12
/// </summary>
13
- public interface ISerializerConfigurator
13
+ public interface IBsonSerializationConfigurator
14
14
{
15
15
/// <summary>
16
16
/// Registers the discriminator for a type.
@@ -77,12 +77,23 @@ void RegisterGenericSerializerDefinition(
77
77
/// <param name="serializer">The serializer.</param>
78
78
/// <returns>True if the serializer was registered on this call, false if the same serializer was already registered on a previous call, throws an exception if a different serializer was already registered.</returns>
79
79
bool TryRegisterSerializer < T > ( IBsonSerializer < T > serializer ) ;
80
+
81
+ /// <summary>
82
+ /// Gets or sets whether to use the NullIdChecker on reference Id types that don't have an IdGenerator registered.
83
+ /// </summary>
84
+ bool UseNullIdChecker { get ; set ; } //TODO This should become a getter only property and a method
85
+
86
+ /// <summary>
87
+ /// Gets or sets whether to use the ZeroIdChecker on value Id types that don't have an IdGenerator registered.
88
+ /// </summary>
89
+ bool UseZeroIdChecker { get ; set ; }
90
+
80
91
}
81
92
82
93
/// <summary>
83
94
/// //TODO
84
95
/// </summary>
85
- public interface IMainSerializer
96
+ public interface IBsonCoreSerializer //TODO Don't like the name but have no better idea at the moment
86
97
{
87
98
/// <summary>
88
99
/// Deserializes an object from a BsonDocument.
@@ -237,23 +248,8 @@ void Serialize(
237
248
/// <summary>
238
249
/// //TODO
239
250
/// </summary>
240
- public interface IBsonSerializationDomain : ISerializerConfigurator , IMainSerializer
251
+ public interface IBsonSerializationConfiguration
241
252
{
242
- /// <summary>
243
- /// Gets the serializer registry.
244
- /// </summary>
245
- IBsonSerializerRegistry SerializerRegistry { get ; }
246
-
247
- /// <summary>
248
- /// Gets or sets whether to use the NullIdChecker on reference Id types that don't have an IdGenerator registered.
249
- /// </summary>
250
- bool UseNullIdChecker { get ; set ; }
251
-
252
- /// <summary>
253
- /// Gets or sets whether to use the ZeroIdChecker on value Id types that don't have an IdGenerator registered.
254
- /// </summary>
255
- bool UseZeroIdChecker { get ; set ; }
256
-
257
253
/// <summary>
258
254
/// Returns whether the given type has any discriminators registered for any of its subclasses.
259
255
/// </summary>
@@ -298,6 +294,17 @@ public interface IBsonSerializationDomain : ISerializerConfigurator, IMainSerial
298
294
IBsonSerializer LookupSerializer ( Type type ) ;
299
295
}
300
296
297
+ /// <summary>
298
+ /// //TODO
299
+ /// </summary>
300
+ public interface IBsonSerializationDomain : IBsonSerializationConfigurator , IBsonSerializationConfiguration , IBsonCoreSerializer
301
+ {
302
+ /// <summary>
303
+ /// Gets the serializer registry.
304
+ /// </summary>
305
+ IBsonSerializerRegistry SerializerRegistry { get ; }
306
+ }
307
+
301
308
internal interface IBsonSerializationDomainInternal : IBsonSerializationDomain
302
309
{
303
310
ReaderWriterLockSlim ConfigLock { get ; }
0 commit comments