The RegistryBinder object is used acquire converters using a binding between a type and its converter. All converters instantiated are cached internally to ensure that the overhead of acquiring a converter is reduced. Converters are created on demand to ensure they are instantiated only if required.
예제 #1
0
 /// <summary>
 /// Constructor for the <c>Registry</c> object. This is used
 /// to create a registry between classes and the converters that
 /// should be used to serialize and deserialize the instances. All
 /// converters are instantiated once and cached for reuse.
 /// </summary>
 public Registry()
 {
     this.binder = new RegistryBinder();
     this.cache  = new ConverterCache();
 }
예제 #2
0
 /// <summary>
 /// Constructor for the <c>Registry</c> object. This is used
 /// to create a registry between classes and the converters that
 /// should be used to serialize and deserialize the instances. All
 /// converters are instantiated once and cached for reuse.
 /// </summary>
 public Registry() {
    this.binder = new RegistryBinder();
    this.cache = new ConverterCache();
 }