IXmlJsonWriterInitializer.xml 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Type Name="IXmlJsonWriterInitializer" FullName="System.Runtime.Serialization.Json.IXmlJsonWriterInitializer">
  3. <TypeSignature Language="C#" Value="public interface IXmlJsonWriterInitializer" />
  4. <TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IXmlJsonWriterInitializer" />
  5. <AssemblyInfo>
  6. <AssemblyName>System.Runtime.Serialization</AssemblyName>
  7. <AssemblyVersion>4.0.0.0</AssemblyVersion>
  8. </AssemblyInfo>
  9. <Interfaces />
  10. <Docs>
  11. <remarks>
  12. <attribution license="cc4" from="Microsoft" modified="false" />
  13. <para>The <see cref="T:System.Xml.XmlDictionaryWriter" /> objects created by the <see cref="Overload:System.Runtime.Serialization.Json.JsonReaderWriterFactory.CreateJsonWriter" /> methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same <see cref="T:System.Xml.XmlDictionaryWriter" /> object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the <see cref="M:System.Runtime.Serialization.Json.IXmlJsonWriterInitializer.SetOutput(System.IO.Stream,System.Text.Encoding,System.Boolean)" /> method.</para>
  14. </remarks>
  15. <summary>
  16. <attribution license="cc4" from="Microsoft" modified="false" />
  17. <para>Specifies the interface for initializing a JavaScript Object Notation (JSON) writer when reusing them to write to a particular output stream.</para>
  18. </summary>
  19. </Docs>
  20. <Members>
  21. <Member MemberName="SetOutput">
  22. <MemberSignature Language="C#" Value="public void SetOutput (System.IO.Stream stream, System.Text.Encoding encoding, bool ownsStream);" />
  23. <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void SetOutput(class System.IO.Stream stream, class System.Text.Encoding encoding, bool ownsStream) cil managed" />
  24. <MemberType>Method</MemberType>
  25. <AssemblyInfo>
  26. <AssemblyVersion>4.0.0.0</AssemblyVersion>
  27. </AssemblyInfo>
  28. <ReturnValue>
  29. <ReturnType>System.Void</ReturnType>
  30. </ReturnValue>
  31. <Parameters>
  32. <Parameter Name="stream" Type="System.IO.Stream" />
  33. <Parameter Name="encoding" Type="System.Text.Encoding" />
  34. <Parameter Name="ownsStream" Type="System.Boolean" />
  35. </Parameters>
  36. <Docs>
  37. <remarks>
  38. <attribution license="cc4" from="Microsoft" modified="false" />
  39. <para>The <see cref="T:System.Xml.XmlDictionaryWriter" /> objects created by the <see cref="Overload:System.Runtime.Serialization.Json.JsonReaderWriterFactory.CreateJsonWriter" /> methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same <see cref="T:System.Xml.XmlDictionaryWriter" /> object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the <see cref="M:System.Runtime.Serialization.Json.IXmlJsonWriterInitializer.SetOutput(System.IO.Stream,System.Text.Encoding,System.Boolean)" /> method.</para>
  40. <para>The writers created by <see cref="T:System.Runtime.Serialization.Json.JsonReaderWriterFactory" /> can handle the UTF-8 and the UTF-16 (big- or little-endian) encodings.</para>
  41. </remarks>
  42. <summary>
  43. <attribution license="cc4" from="Microsoft" modified="false" />
  44. <para>Initializes (or reinitializes) a JavaScript Object Notation (JSON) writer to a specified output stream with specified character encoding.</para>
  45. </summary>
  46. <param name="stream">
  47. <attribution license="cc4" from="Microsoft" modified="false" />The output <see cref="T:System.IO.Stream" /> to which the writer writes. </param>
  48. <param name="encoding">
  49. <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Text.Encoding" /> that specifies the character encoding of the output stream.</param>
  50. <param name="ownsStream">
  51. <attribution license="cc4" from="Microsoft" modified="false" />If true, the output stream is closed by the writer when done; otherwise false.</param>
  52. </Docs>
  53. </Member>
  54. </Members>
  55. </Type>