BinaryAttachment

Allows the storing of files into a database.

Namespace:
Inetdev.Data
Type:
Class
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
No
Inherits from:
System.Object
Implements:
Inetdev.Data.IAttachment

Constructors

BinaryAttachment

Default constructor

Signature:
public Void BinaryAttachment()

BinaryAttachment

Initializes a new instance of BinaryAttachment.

Signature:
public Void BinaryAttachment(serialized)
Parameters
Name Type Summary
serialized Byte[] The serialized data.

BinaryAttachment

Initializes a new instance of BinaryAttachment.

Signature:
public Void BinaryAttachment(serialized, throwIfError)
Parameters
Name Type Summary
serialized Byte[] The serialized data.
throwIfError Boolean true is an exception must be thrown if deserialization fails, otherwise false.
Exceptions
Type Summary
BinaryAttachmentFormatException Thrown when throwIfError is true and serialized could not be deserialized.

BinaryAttachment

Initializes a new instance of BinaryAttachment.

Signature:
public Void BinaryAttachment(data, fileName, contentType)
Parameters
Name Type Summary
data Byte[] The attachment file content.
fileName String The attachment file name.
contentType String The attachment content type.

Properties

BinaryData

The binary data to be stored into the database field.

Signature:
public Byte[] BinaryData { get; }

ContentLength

The content length of the attached file.

Signature:
public Int64 ContentLength { get; }

ContentType

Content type of the file contained into this object

Signature:
public String ContentType { get; set; }

FileContent

File content of this attachment

Signature:
public Byte[] FileContent { get; set; }

FileName

File name of this attachment

Signature:
public String FileName { get; set; }

Methods

ToString

Returns a textual repredentation of this BinaryAttachment.

Signature:
public String ToString()