SerializerWriterCollator.WriteAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, asynchronously writes a given Visual element to the serialization stream.
Overloads
WriteAsync(Visual) |
When overridden in a derived class, asynchronously writes a given Visual element to the serialization stream. |
WriteAsync(Visual, Object) |
When overridden in a derived class, asynchronously writes a given Visual element with a specified event identifier to the serialization stream. |
WriteAsync(Visual, PrintTicket) |
When overridden in a derived class, asynchronously writes a given Visual element together with an associated print ticket to the serialization stream. |
WriteAsync(Visual, PrintTicket, Object) |
When overridden in a derived class, asynchronously writes a given Visual element together with an associated print ticket and identifier to the serialization stream. |
Remarks
The WriteAsync methods write to the stream associated with the SerializerWriter that created the SerializerWriterCollator from the call to CreateVisualsCollator.
WriteAsync(Visual)
When overridden in a derived class, asynchronously writes a given Visual element to the serialization stream.
public:
abstract void WriteAsync(System::Windows::Media::Visual ^ visual);
public abstract void WriteAsync (System.Windows.Media.Visual visual);
abstract member WriteAsync : System.Windows.Media.Visual -> unit
Public MustOverride Sub WriteAsync (visual As Visual)
Parameters
Remarks
The WriteAsync methods write to the stream associated with the SerializerWriter that created the SerializerWriterCollator from the call to CreateVisualsCollator.
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Write(Visual).
See also
Applies to
WriteAsync(Visual, Object)
When overridden in a derived class, asynchronously writes a given Visual element with a specified event identifier to the serialization stream.
public:
abstract void WriteAsync(System::Windows::Media::Visual ^ visual, System::Object ^ userState);
public abstract void WriteAsync (System.Windows.Media.Visual visual, object userState);
abstract member WriteAsync : System.Windows.Media.Visual * obj -> unit
Public MustOverride Sub WriteAsync (visual As Visual, userState As Object)
Parameters
- userState
- Object
A caller-specified object to identify the asynchronous write operation.
Remarks
The WriteAsync methods write to the stream associated with the SerializerWriter that created the SerializerWriterCollator from the call to CreateVisualsCollator.
userState
is passed to the WritingCompletedEventHandler when the WritingCompleted event occurs.
See also
Applies to
WriteAsync(Visual, PrintTicket)
When overridden in a derived class, asynchronously writes a given Visual element together with an associated print ticket to the serialization stream.
public:
abstract void WriteAsync(System::Windows::Media::Visual ^ visual, System::Printing::PrintTicket ^ printTicket);
public abstract void WriteAsync (System.Windows.Media.Visual visual, System.Printing.PrintTicket printTicket);
abstract member WriteAsync : System.Windows.Media.Visual * System.Printing.PrintTicket -> unit
Public MustOverride Sub WriteAsync (visual As Visual, printTicket As PrintTicket)
Parameters
- printTicket
- PrintTicket
The default print preferences for the visual
element.
Remarks
The WriteAsync method writes to the stream associated with the SerializerWriter that created the SerializerWriterCollator from the call to CreateVisualsCollator.
printTicket
can be null
if there are no preferred print settings.
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Write(Visual, PrintTicket).
See also
Applies to
WriteAsync(Visual, PrintTicket, Object)
When overridden in a derived class, asynchronously writes a given Visual element together with an associated print ticket and identifier to the serialization stream.
public:
abstract void WriteAsync(System::Windows::Media::Visual ^ visual, System::Printing::PrintTicket ^ printTicket, System::Object ^ userState);
public abstract void WriteAsync (System.Windows.Media.Visual visual, System.Printing.PrintTicket printTicket, object userState);
abstract member WriteAsync : System.Windows.Media.Visual * System.Printing.PrintTicket * obj -> unit
Public MustOverride Sub WriteAsync (visual As Visual, printTicket As PrintTicket, userState As Object)
Parameters
- printTicket
- PrintTicket
The default print preferences for the visual
element.
- userState
- Object
A caller-specified object to identify the asynchronous write operation.
Remarks
The WriteAsync method writes to the stream associated with the SerializerWriter that created the SerializerWriterCollator from the call to CreateVisualsCollator.
printTicket
can be null
if there are no preferred print settings.
userState
is passed to the WritingCompletedEventHandler when the WritingCompleted event occurs.