コード例 #1
0
        internal void EdmModelCsdlSchemaWriterTest(Action <EdmModelCsdlSchemaWriter> testAction, string expectedPayload)
        {
            XmlWriter                xmlWriter;
            MemoryStream             memoryStream;
            EdmModelCsdlSchemaWriter schemaWriter = CreateEdmModelCsdlSchemaWriter(out xmlWriter, out memoryStream);

            testAction(schemaWriter);

            xmlWriter.Flush();
            memoryStream.Seek(0, SeekOrigin.Begin);
            StreamReader reader = new StreamReader(memoryStream);

            // Removing xml header to make the baseline's more compact and focused on the test at hand.
            string result = reader.ReadToEnd().Replace(@"<?xml version=""1.0"" encoding=""utf-8""?>", string.Empty);

            Assert.AreEqual(expectedPayload, result);
        }
コード例 #2
0
 internal EdmModelReferenceElementsVisitor(IEdmModel model, XmlWriter xmlWriter, Version edmxVersion)
 {
     this.schemaWriter = new EdmModelCsdlSchemaWriter(model, model.GetNamespaceAliases(), xmlWriter, edmxVersion);
 }