Namespace: | Sirenix.Serialization |
Assembly: | Sirenix.Serialization |
public sealed class SerializationContext : ICacheNotificationReceiver
public SerializationContext()
public SerializationContext(FormatterConverter formatterConverter)
System.Runtime.Serialization.FormatterConverter | formatterConverter | The formatter converter to use. |
public SerializationContext(StreamingContext context)
System.Runtime.Serialization.StreamingContext | context | The streaming context to use. |
public SerializationContext(StreamingContext context, FormatterConverter formatterConverter)
System.Runtime.Serialization.StreamingContext | context | The streaming context to use. |
System.Runtime.Serialization.FormatterConverter | formatterConverter | The formatter converter to use. |
System.ArgumentNullException | The formatterConverter parameter is null. |
public TwoWaySerializationBinder Binder { get; set; }
public SerializationConfig Config { get; set; }
public IFormatterConverter FormatterConverter { get; }
public IExternalGuidReferenceResolver GuidReferenceResolver { get; set; }
public IExternalIndexReferenceResolver IndexReferenceResolver { get; set; }
public StreamingContext StreamingContext { get; }
public IExternalStringReferenceResolver StringReferenceResolver { get; set; }
public void ResetInternalReferences()
public void ResetToDefault()
public bool TryGetInternalReferenceId(object reference, out int id)
System.Object | reference | The reference to get the id of. |
System.Int32 | id | The id that was found, or -1 if no id was found. |
System.Boolean |
|
public bool TryRegisterExternalReference(object obj, out Guid guid)
System.Object | obj | The object to reference. |
System.Guid | guid | The guid of the referenced object. |
System.Boolean |
|
public bool TryRegisterExternalReference(object obj, out int index)
System.Object | obj | The object to reference. |
System.Int32 | index | The index of the referenced object. |
System.Boolean |
|
public bool TryRegisterExternalReference(object obj, out string id)
System.Object | obj | The object to reference. |
System.String | id | The id string of the referenced object. |
System.Boolean |
|
true
if the reference was registered, otherwise, false
when the reference has already been registered.
public bool TryRegisterInternalReference(object reference, out int id)
System.Object | reference | The reference to register. |
System.Int32 | id | The id of the registered reference. |
System.Boolean |
|