Exemplo n.º 1
0
 private void ExportSerializationSchema()
 {
     if (!Schemas.Contains(Globals.SerializationNamespace))
     {
         StringReader reader = new StringReader(Globals.SerializationSchema);
         XmlSchema    schema = XmlSchema.Read(new XmlTextReader(reader)
         {
             DtdProcessing = DtdProcessing.Prohibit
         }, null);
         if (schema == null)
         {
             throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(SR.CouldNotReadSerializationSchema, Globals.SerializationNamespace)));
         }
         Schemas.Add(schema);
     }
 }