Embeds another copy of an existing attachment.

Namespace:  Gallio.Framework
Assembly:  Gallio (in Gallio.dll) Version: 3.3.0.0 (3.3.459.0)

Syntax

C#
public static void EmbedExisting(
	string attachmentName
)
Visual Basic (Declaration)
Public Shared Sub EmbedExisting ( _
	attachmentName As String _
)

Parameters

attachmentName
Type: System..::.String
The name of the existing attachment to embed.

Remarks

This is a convenience method that forwards the request to the current default log stream writer as returned by the Default property.

Remarks

This method can be used to repeatedly embed an existing attachment at multiple points in multiple streams without needing to keep the Attachment instance itself around. This can help to reduce memory footprint since the original Attachment instance can be garbage collected shortly after it is first attached.

An attachment instance can be embedded multiple times efficiently since each embedded copy is typically represented as a link to the same common attachment instance.

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionThrown if attachmentName is null.
System..::.InvalidOperationExceptionThrown if no attachment with the specified name has been previously attached.

See Also