Skip to content

Commit 529127e

Browse files
committed
Serialize system types in preparation for .NET Core. (fix)
1 parent 3e9c9b6 commit 529127e

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/NHibernate/Properties/BasicPropertyAccessor.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ private BasicGetter(SerializationInfo info, StreamingContext context)
193193

194194
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
195195
{
196-
info.AddValueWithType("clazz", new SerializableSystemType(this.clazz));
197-
info.AddValueWithType("property", SerializablePropertyInfo.Wrap(this.property));
196+
info.AddValue("clazz", SerializableSystemType.Wrap(this.clazz));
197+
info.AddValue("property", SerializablePropertyInfo.Wrap(this.property));
198198
info.AddValue("propertyName", this.propertyName);
199199
}
200200

@@ -307,8 +307,8 @@ private BasicSetter(SerializationInfo info, StreamingContext context)
307307

308308
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
309309
{
310-
info.AddValueWithType("clazz", new SerializableSystemType(this.clazz));
311-
info.AddValueWithType("property", SerializablePropertyInfo.Wrap(this.property));
310+
info.AddValue("clazz", SerializableSystemType.Wrap(this.clazz));
311+
info.AddValue("property", SerializablePropertyInfo.Wrap(this.property));
312312
info.AddValue("propertyName", this.propertyName);
313313
}
314314

src/NHibernate/Properties/FieldAccessor.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ private FieldGetter(SerializationInfo info, StreamingContext context)
191191

192192
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
193193
{
194-
info.AddValueWithType("field", SerializableFieldInfo.Wrap(this.field));
195-
info.AddValueWithType("clazz", new SerializableSystemType(this.clazz));
194+
info.AddValue("field", SerializableFieldInfo.Wrap(this.field));
195+
info.AddValue("clazz", SerializableSystemType.Wrap(this.clazz));
196196
info.AddValue("name", this.name);
197197
}
198198

@@ -293,8 +293,8 @@ private FieldSetter(SerializationInfo info, StreamingContext context)
293293

294294
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
295295
{
296-
info.AddValueWithType("field", SerializableFieldInfo.Wrap(this.field));
297-
info.AddValueWithType("clazz", new SerializableSystemType(this.clazz));
296+
info.AddValue("field", SerializableFieldInfo.Wrap(this.field));
297+
info.AddValue("clazz", SerializableSystemType.Wrap(this.clazz));
298298
info.AddValue("name", this.name);
299299
}
300300

src/NHibernate/Proxy/Poco/BasicLazyInitializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected internal BasicLazyInitializer(string entityName, System.Type persisten
2525
IAbstractComponentType componentIdType, ISessionImplementor session, bool overridesEquals)
2626
: base(entityName, id, session)
2727
{
28-
this.persistentClass = new SerializableSystemType(persistentClass);
28+
this.persistentClass = SerializableSystemType.Wrap(persistentClass);
2929
this.getIdentifierMethod = SerializableMethodInfo.Wrap(getIdentifierMethod);
3030
this.setIdentifierMethod = SerializableMethodInfo.Wrap(setIdentifierMethod);
3131
this.componentIdType = componentIdType;

src/NHibernate/Transform/AliasToBeanConstructorResultTransformer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ protected AliasToBeanConstructorResultTransformer(SerializationInfo info, Stream
2929

3030
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
3131
{
32-
info.AddValueWithType("constructor", new SerializableConstructorInfo(this.constructor));
32+
info.AddValue("constructor", SerializableConstructorInfo.Wrap(this.constructor));
3333
}
3434

3535
public object TransformTuple(object[] tuple, string[] aliases)

0 commit comments

Comments
 (0)