Gemstone Common Library
Show/Hide TOC

# ISupportBinaryImageExtensionsBinaryImage Method

Returns a binary image of an object that implements ISupportBinaryImage.

## Definition

Namespace: Gemstone.IO.Parsing
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.164 -- Release Build+6bbd7ea5ff4ad8917f12d693358b77d083ee278e
C#
View Source Request Example

    public static byte[] BinaryImage(
    	this ISupportBinaryImage imageSource,
    	bool clearArray = false
    )

VB
View Source Request Example

    <ExtensionAttribute>
    Public Shared Function BinaryImage (
    	imageSource As ISupportBinaryImage,
    	Optional clearArray As Boolean = false
    ) As Byte()

C++
View Source Request Example

    public:
    [ExtensionAttribute]
    static array<unsigned char>^ BinaryImage(
    	ISupportBinaryImage^ imageSource,
    	bool clearArray = false
    )

JavaScript
View Source Request Example

    Gemstone.IO.Parsing.ISupportBinaryImageExtensions.BinaryImage = function(imageSource, clearArray);

#### Parameters

imageSource ISupportBinaryImage
  ISupportBinaryImage source.
clearArray Boolean (Optional)
  Clears any rented buffers of their contents so that a subsequent consumer will not see the previous consumer's content. If false, default, the array's contents are left unchanged.

#### Return Value

Byte
A binary image of an object that implements ISupportBinaryImage.

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ISupportBinaryImage. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

## Remarks

This is a convenience method. It is often optimal to use GenerateBinaryImage(Byte, Int32) directly using a common buffer instead of always allocating new buffers.

## Exceptions

ArgumentNullException | imageSource cannot be null.

## See Also

#### Reference

ISupportBinaryImageExtensions Class
Gemstone.IO.Parsing Namespace