diff --git a/src/Microsoft.OData.Core/Json/DefaultStreamBasedJsonWriterFactory.cs b/src/Microsoft.OData.Core/Json/DefaultStreamBasedJsonWriterFactory.cs
index 7e5b83b6c1..baf594ca30 100644
--- a/src/Microsoft.OData.Core/Json/DefaultStreamBasedJsonWriterFactory.cs
+++ b/src/Microsoft.OData.Core/Json/DefaultStreamBasedJsonWriterFactory.cs
@@ -50,6 +50,11 @@ public IJsonWriter CreateJsonWriter(Stream stream, bool isIeee754Compatible, Enc
return new ODataUtf8JsonWriter(stream, isIeee754Compatible, encoding, encoder: this.encoder);
}
+
+ public IJsonWriterAsync CreateAsynchronousJsonWriter(Stream stream, bool isIeee754Compatible, Encoding encoding)
+ {
+ throw new NotImplementedException();
+ }
}
}
#endif
diff --git a/src/Microsoft.OData.Core/Json/IStreamBasedJsonWriterFactory.cs b/src/Microsoft.OData.Core/Json/IStreamBasedJsonWriterFactory.cs
index 808ba8cfe5..091273b3c6 100644
--- a/src/Microsoft.OData.Core/Json/IStreamBasedJsonWriterFactory.cs
+++ b/src/Microsoft.OData.Core/Json/IStreamBasedJsonWriterFactory.cs
@@ -25,5 +25,16 @@ public interface IStreamBasedJsonWriterFactory
/// The text encoding of the output data.
/// The JSON writer created.
IJsonWriter CreateJsonWriter(Stream stream, bool isIeee754Compatible, Encoding encoding);
+
+ ///
+ /// Creates an asynchronous JSON writer of .
+ /// The returned instance should also implement the synchronous
+ /// interface.
+ ///
+ /// Output stream to which the resulting should write data.
+ /// True if it is IEEE754Compatible.
+ /// The text encoding of the output data.
+ /// The JSON writer created.
+ IJsonWriterAsync CreateAsynchronousJsonWriter(Stream stream, bool isIeee754Compatible, Encoding encoding);
}
}
diff --git a/test/FunctionalTests/Microsoft.OData.Core.Tests/Json/MockStreamBasedJsonWriterFactory.cs b/test/FunctionalTests/Microsoft.OData.Core.Tests/Json/MockStreamBasedJsonWriterFactory.cs
index 10351e1521..ba33a509a7 100644
--- a/test/FunctionalTests/Microsoft.OData.Core.Tests/Json/MockStreamBasedJsonWriterFactory.cs
+++ b/test/FunctionalTests/Microsoft.OData.Core.Tests/Json/MockStreamBasedJsonWriterFactory.cs
@@ -24,6 +24,11 @@ public IJsonWriter CreateJsonWriter(Stream stream, bool isIeee754Compatible, Enc
{
return this.jsonWriter;
}
+
+ public IJsonWriterAsync CreateAsynchronousJsonWriter(Stream stream, bool isIeee754Compatible, Encoding encoding)
+ {
+ throw new System.NotImplementedException();
+ }
}
}
#endif
diff --git a/test/FunctionalTests/Microsoft.OData.Core.Tests/Json/MockStreamBasedJsonWriterFactoryWrapper.cs b/test/FunctionalTests/Microsoft.OData.Core.Tests/Json/MockStreamBasedJsonWriterFactoryWrapper.cs
index 37c0da6c15..2131680e30 100644
--- a/test/FunctionalTests/Microsoft.OData.Core.Tests/Json/MockStreamBasedJsonWriterFactoryWrapper.cs
+++ b/test/FunctionalTests/Microsoft.OData.Core.Tests/Json/MockStreamBasedJsonWriterFactoryWrapper.cs
@@ -41,6 +41,11 @@ public IJsonWriter CreateJsonWriter(Stream stream, bool isIeee754Compatible, Enc
return writer;
}
+ public IJsonWriterAsync CreateAsynchronousJsonWriter(Stream stream, bool isIeee754Compatible, Encoding encoding)
+ {
+ throw new NotImplementedException();
+ }
+
///
/// The that was last created by the wrapped .
///
diff --git a/test/PublicApiTests/BaseLine/Microsoft.OData.PublicApi.net45.bsl b/test/PublicApiTests/BaseLine/Microsoft.OData.PublicApi.net45.bsl
index a868ed5089..7c914234f0 100644
--- a/test/PublicApiTests/BaseLine/Microsoft.OData.PublicApi.net45.bsl
+++ b/test/PublicApiTests/BaseLine/Microsoft.OData.PublicApi.net45.bsl
@@ -5975,6 +5975,7 @@ public interface Microsoft.OData.Json.IJsonWriterFactoryAsync {
CLSCompliantAttribute(),
]
public interface Microsoft.OData.Json.IStreamBasedJsonWriterFactory {
+ Microsoft.OData.Json.IJsonWriterAsync CreateAsynchronousJsonWriter (System.IO.Stream stream, bool isIeee754Compatible, System.Text.Encoding encoding)
Microsoft.OData.Json.IJsonWriter CreateJsonWriter (System.IO.Stream stream, bool isIeee754Compatible, System.Text.Encoding encoding)
}
diff --git a/test/PublicApiTests/BaseLine/Microsoft.OData.PublicApi.netstandard1.1.bsl b/test/PublicApiTests/BaseLine/Microsoft.OData.PublicApi.netstandard1.1.bsl
index 54e10ddc30..df3c0a5326 100644
--- a/test/PublicApiTests/BaseLine/Microsoft.OData.PublicApi.netstandard1.1.bsl
+++ b/test/PublicApiTests/BaseLine/Microsoft.OData.PublicApi.netstandard1.1.bsl
@@ -5975,6 +5975,7 @@ public interface Microsoft.OData.Json.IJsonWriterFactoryAsync {
CLSCompliantAttribute(),
]
public interface Microsoft.OData.Json.IStreamBasedJsonWriterFactory {
+ Microsoft.OData.Json.IJsonWriterAsync CreateAsynchronousJsonWriter (System.IO.Stream stream, bool isIeee754Compatible, System.Text.Encoding encoding)
Microsoft.OData.Json.IJsonWriter CreateJsonWriter (System.IO.Stream stream, bool isIeee754Compatible, System.Text.Encoding encoding)
}
diff --git a/test/PublicApiTests/BaseLine/Microsoft.OData.PublicApi.netstandard2.0.bsl b/test/PublicApiTests/BaseLine/Microsoft.OData.PublicApi.netstandard2.0.bsl
index a868ed5089..7c914234f0 100644
--- a/test/PublicApiTests/BaseLine/Microsoft.OData.PublicApi.netstandard2.0.bsl
+++ b/test/PublicApiTests/BaseLine/Microsoft.OData.PublicApi.netstandard2.0.bsl
@@ -5975,6 +5975,7 @@ public interface Microsoft.OData.Json.IJsonWriterFactoryAsync {
CLSCompliantAttribute(),
]
public interface Microsoft.OData.Json.IStreamBasedJsonWriterFactory {
+ Microsoft.OData.Json.IJsonWriterAsync CreateAsynchronousJsonWriter (System.IO.Stream stream, bool isIeee754Compatible, System.Text.Encoding encoding)
Microsoft.OData.Json.IJsonWriter CreateJsonWriter (System.IO.Stream stream, bool isIeee754Compatible, System.Text.Encoding encoding)
}