All pages
Powered by GitBook
1 of 1

Loading...

DataObject

Wisej.Web.DataObject

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.0.0.0)

Implements a basic data transfer mechanism.

public class DataObject : IDataObject
Public Class DataObject
    Inherits IDataObject

Constructors

DataObject()

Initializes a new instance of the class.

DataObject(data)

Initializes a new instance of the class and adds the specified object to it.

Name
Type
Description

DataObject(format, data)

Initializes a new instance of the class and adds the specified object in the specified format.

Name
Type
Description

DataObject(format, data)

Initializes a new instance of the class and adds the specified object in the specified format.

Name
Type
Description

Methods

ContainsAudio()

Indicates whether the data object contains data in the format.

Returns: . true if the data object contains audio data; otherwise, false.

ContainsFileDropList()

Indicates whether the data object contains data that is in the format or can be converted to that format.

Returns: . true if the data object contains a file drop list; otherwise, false.

ContainsImage()

Indicates whether the data object contains data that is in the format or can be converted to that format.

Returns: . true if the data object contains image data; otherwise, false.

ContainsText()

Indicates whether the data object contains data in the format.

Returns: . true if the data object contains text data; otherwise, false.

ContainsText(format)

Indicates whether the data object contains text data in the format indicated by the specified value.

Parameter
Type
Description

Returns: . true if the data object contains text data in the specified format; otherwise, false.

GetAudioStream()

Retrieves an audio stream from the data object.

Returns: . A containing audio data or null if the data object does not contain any data in the format.

GetData(format)

Returns the data associated with the specified class type format.

Parameter
Type
Description

Returns: . The data associated with the specified format, or null.

GetData(format)

Returns the data associated with the specified data format.

Parameter
Type
Description

Returns: . The data associated with the specified format, or null.

GetData(format, autoConvert)

Returns the data associated with the specified data format, using an automated conversion parameter to determine whether to convert the data to the format.

Parameter
Type
Description

Returns: . The data associated with the specified format, or null.

GetDataPresent(format)

Determines whether data stored in this is associated with, or can be converted to, the specified format.

Parameter
Type
Description

Returns: . true if data stored in this is associated with, or can be converted to, the specified format; otherwise, false.

GetDataPresent(format)

Returns the data associated with the specified class type format.

Parameter
Type
Description

Returns: . The data associated with the specified format, or null.

GetDataPresent(format, autoConvert)

Determines whether this contains data in the specified format or, optionally, contains data that can be converted to the specified format.

Parameter
Type
Description

Returns: . true if the data is in, or can be converted to, the specified format; otherwise, false.

GetFileDropList()

Returns the list of file types from the data object.

Returns: . A string array containing the file types in the data object.

GetFiles()

Returns the of files uploaded by the client in a drag & drop operation.

Returns: . A string array containing the file types in the data object.

GetFormats()

Returns a list of all formats that data stored in this is associated with or can be converted to.

Returns: . An array of type , containing a list of all formats that are supported by the data stored in this object.

GetFormats(autoConvert)

Returns a list of all formats that data stored in this is associated with or can be converted to, using an automatic conversion parameter to determine whether to retrieve only native data formats or all formats that the data can be converted to.

Parameter
Type
Description

Returns: . An array of type , containing a list of all formats that are supported by the data stored in this object.

GetImage()

Retrieves an image from the data object.

Returns: . An representing the image data in the data object or null if the data object does not contain any data that is in the format or can be converted to that format.

GetText()

Retrieves text data from the data object in the format.

Returns: . The text data in the data object or if the data object does not contain data in the format.

GetText(format)

Retrieves text data from the data object in the format indicated by the specified value.

Parameter
Type
Description

Returns: . The text data in the data object or if the data object does not contain data in the specified format.

SetAudio(audioBytes)

Adds a array to the data object in the format after converting it to a .

Parameter
Type
Description

Throws:

  • audioBytes is null.

SetAudio(audioStream)

Adds a to the data object in the format.

Parameter
Type
Description

Throws:

  • audioStream is null.

SetData(data)

Adds the specified object to the using the object type as the data format.

Parameter
Type
Description

SetData(format, data)

Adds the specified object to the using the specified type as the format.

Parameter
Type
Description

SetData(format, data)

Adds the specified object to the using the specified format.

Parameter
Type
Description

SetData(format, autoConvert, data)

Adds the specified object to the using the specified format and indicating whether the data can be converted to another format.

Parameter
Type
Description

SetDownloadURL(url, fileName)

Adds a url using format. The specified url is parsed to compose the DownloadURL as: "mime-type:file-name:url".

Parameter
Type
Description

SetFileDropList(filePaths)

Adds a collection of file names to the data object in the format.

Parameter
Type
Description

Throws:

  • filePaths is null.

SetFileDropList(filePaths)

Adds a collection of file names to the data object in the format.

Parameter
Type
Description

Throws:

  • filePaths is null.

SetImage(image)

Adds an to the data object in the format.

Parameter
Type
Description

Throws:

  • image is null.

SetText(textData)

Adds text data to the data object in the format.

Parameter
Type
Description

Throws:

  • textData is null or .

SetText(textData, format)

Adds text data to the data object in the format indicated by the specified value.

Parameter
Type
Description

Throws:

  • textData is null or .

Implements

Name
Description

data

Object

The data to store.

format

String

The format of the specified data. See DataFormats for predefined formats.

data

Object

The data to store.

format

Type

A Type representing the format of the data.

data

Object

The data to store.

format

TextDataFormat

One of the TextDataFormat values.

format

Type

A Type representing the format of the data to retrieve.

format

String

The format of the data to retrieve. See DataFormats for predefined formats.

format

String

The format of the data to retrieve. See DataFormats for predefined formats.

autoConvert

Boolean

true to the convert data to the specified format; otherwise, false.

format

Type

A Type representing the format to check for.

format

String

A Type representing the format of the data to retrieve.

format

String

The format to check for. See DataFormats for predefined formats.

autoConvert

Boolean

true to determine whether data stored in this DataObject can be converted to the specified format; false to check whether the data is in the specified format.

autoConvert

Boolean

true to retrieve all formats that data stored in this DataObject is associated with, or can be converted to; false to retrieve only native data formats.

format

TextDataFormat

One of the TextDataFormat values.

audioBytes

Byte[]

A Byte array containing the audio data.

audioStream

Stream

A Stream containing the audio data.

data

Object

The data to store.

format

Type

A Type representing the format associated with the data.

data

Object

The data to store.

format

String

The format associated with the data. See DataFormats for predefined formats.

data

Object

The data to store.

format

String

The format associated with the data. See DataFormats for predefined formats.

autoConvert

Boolean

true to allow the data to be converted to another format; otherwise, false.

data

Object

The data to store.

url

String

The url to the file to download.

fileName

String

The name of the file to download from the url.

filePaths

StringCollection

A StringCollection containing the file names.

filePaths

String[]

A StringCollection containing the file names.

image

Image

The Image to add to the data object.

textData

String

The text to add to the data object.

textData

String

The text to add to the data object.

format

TextDataFormat

One of the TextDataFormat values.

IDataObject

Provides a format-independent mechanism for transferring data.

DataObject
DataObject
DataObject
DataObject
WaveAudio
Boolean
FileDrop
Boolean
Bitmap
Boolean
UnicodeText
Boolean
TextDataFormat
Boolean
Stream
Stream
WaveAudio
Object
Object
Object
DataObject
Boolean
DataObject
Boolean
DataObject
Boolean
String[]
HttpFileCollection
HttpFileCollection
DataObject
String[]
String
DataObject
String[]
String
Image
Image
Bitmap
UnicodeText
String
Empty
UnicodeText
TextDataFormat
String
Empty
Byte
WaveAudio
Stream
ArgumentNullException
Stream
WaveAudio
ArgumentNullException
DataObject
DataObject
DataObject
DataObject
DownloadURL
FileDrop
ArgumentNullException
FileDrop
ArgumentNullException
Image
Bitmap
ArgumentNullException
UnicodeText
ArgumentNullException
Empty
TextDataFormat
ArgumentNullException
Empty