Exemple #1
0
 public XSerializer(Type rootType, IEnumerable<Type> includedTypes, XSerializableSurrogateCollection serializableSurrogates)
 {
     if (rootType == null) throw new ArgumentNullException("rootType");
     builder = new XSerializerBuilder(serializableSurrogates);
     builder.RegisterBuiltInTypes();
     builder.RegisterRootType(rootType);
     if (includedTypes == null) return;
     foreach (var t in includedTypes)
     {
         if (t != null) builder.RegisterType(t);
     }
 }
 public XSerializationState(StreamingContext context, XSerializerBuilder builder)
 {
     referenceChain = new Stack();
     _Builder = builder;
     _Context = context;
 }