File tree Expand file tree Collapse file tree 1 file changed +1
-19
lines changed
src/MongoDB.Bson/Serialization Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -1057,7 +1057,7 @@ public void Reset()
1057
1057
_creatorMaps . Clear ( ) ;
1058
1058
_creator = null ;
1059
1059
_declaredMemberMaps = new List < BsonMemberMap > ( ) ;
1060
- _discriminator = ComputeDiscriminator ( ) ;
1060
+ _discriminator = BsonUtils . GetFriendlyTypeName ( _classType ) ;
1061
1061
_discriminatorIsRequired = false ;
1062
1062
_extraElementsMemberMap = null ;
1063
1063
_idMemberMap = null ;
@@ -1067,24 +1067,6 @@ public void Reset()
1067
1067
_knownTypes . Clear ( ) ;
1068
1068
}
1069
1069
1070
- private string ComputeDiscriminator ( )
1071
- {
1072
- /*
1073
- * The discriminator is computed as follows:
1074
- * - if the class is non generic, that's just the name of the class
1075
- * - if the class is generic, then it's the AssemblyQualifiedName
1076
- */
1077
-
1078
- if ( _classType . IsGenericType )
1079
- {
1080
- return BsonUtils . GetFriendlyTypeName ( _classType ) ; //TODO We could just remove this method, keeping it in case I need to do something
1081
- }
1082
- else
1083
- {
1084
- return _classType . Name ;
1085
- }
1086
- }
1087
-
1088
1070
/// <summary>
1089
1071
/// Sets the creator for the object.
1090
1072
/// </summary>
You can’t perform that action at this time.
0 commit comments