C# Class SystemEx.Windows.Forms.OleDropData

Provides a format-independant machanism for transfering data with support for outlook messages and attachments.
Inheritance: System.Windows.Forms.IDataObject
Datei anzeigen Open project: pvginkel/SystemEx Class Usage Examples

Public Methods

Method Description
GetData ( string format, int index ) : MemoryStream

Retrieves the data associated with the specified data format at the specified index.

GetData ( Type format ) : object

Retrieves the data associated with the specified class type format.

GetData ( string format ) : object

Retrieves the data associated with the specified data format.

GetData ( string format, bool autoConvert ) : object

Retrieves the data associated with the specified data format, using a Boolean to determine whether to convert the data to the format.

GetDataPresent ( Type format ) : bool

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

GetDataPresent ( string format ) : bool

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

GetDataPresent ( string format, bool autoConvert ) : bool

Determines whether data stored in this instance is associated with the specified format, using a Boolean value to determine whether to convert the data to the format.

GetFormats ( ) : string[]

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

GetFormats ( bool autoConvert ) : string[]

Gets a list of all formats that data stored in this instance is associated with or can be converted to, using a Boolean value to determine whether to retrieve all formats that the data can be converted to or only native data formats.

OleDropData ( System underlyingDataObject ) : System

Initializes a new instance of the OutlookDataObject class.

SetData ( Type format, object data ) : void

Stores the specified data and its associated class type in this instance.

SetData ( object data ) : void

Stores the specified data in this instance, using the class of the data for the format.

SetData ( string format, bool autoConvert, object data ) : void

Stores the specified data and its associated format in this instance, using a Boolean value to specify whether the data can be converted to another format.

SetData ( string format, object data ) : void

Stores the specified data and its associated format in this instance.

Method Details

GetData() public method

Retrieves the data associated with the specified data format at the specified index.
public GetData ( string format, int index ) : MemoryStream
format string The format of the data to retrieve. See for predefined formats.
index int The index of the data to retrieve.
return System.IO.MemoryStream

GetData() public method

Retrieves the data associated with the specified class type format.
public GetData ( Type format ) : object
format System.Type A representing the format of the data to retrieve. See for predefined formats.
return object

GetData() public method

Retrieves the data associated with the specified data format.
public GetData ( string format ) : object
format string The format of the data to retrieve. See for predefined formats.
return object

GetData() public method

Retrieves the data associated with the specified data format, using a Boolean to determine whether to convert the data to the format.
public GetData ( string format, bool autoConvert ) : object
format string The format of the data to retrieve. See for predefined formats.
autoConvert bool true to convert the data to the specified format; otherwise, false.
return object

GetDataPresent() public method

Determines whether data stored in this instance is associated with, or can be converted to, the specified format.
public GetDataPresent ( Type format ) : bool
format System.Type A representing the format for which to check. See for predefined formats.
return bool

GetDataPresent() public method

Determines whether data stored in this instance is associated with, or can be converted to, the specified format.
public GetDataPresent ( string format ) : bool
format string The format for which to check. See for predefined formats.
return bool

GetDataPresent() public method

Determines whether data stored in this instance is associated with the specified format, using a Boolean value to determine whether to convert the data to the format.
public GetDataPresent ( string format, bool autoConvert ) : bool
format string The format for which to check. See for predefined formats.
autoConvert bool true to determine whether data stored in this instance can be converted to the specified format; false to check whether the data is in the specified format.
return bool

GetFormats() public method

Returns a list of all formats that data stored in this instance is associated with or can be converted to.
public GetFormats ( ) : string[]
return string[]

GetFormats() public method

Gets a list of all formats that data stored in this instance is associated with or can be converted to, using a Boolean value to determine whether to retrieve all formats that the data can be converted to or only native data formats.
public GetFormats ( bool autoConvert ) : string[]
autoConvert bool true to retrieve all formats that data stored in this instance is associated with or can be converted to; false to retrieve only native data formats.
return string[]

OleDropData() public method

Initializes a new instance of the OutlookDataObject class.
public OleDropData ( System underlyingDataObject ) : System
underlyingDataObject System The underlying data object to wrap.
return System

SetData() public method

Stores the specified data and its associated class type in this instance.
public SetData ( Type format, object data ) : void
format System.Type A representing the format associated with the data. See for predefined formats.
data object The data to store.
return void

SetData() public method

Stores the specified data in this instance, using the class of the data for the format.
public SetData ( object data ) : void
data object The data to store.
return void

SetData() public method

Stores the specified data and its associated format in this instance, using a Boolean value to specify whether the data can be converted to another format.
public SetData ( string format, bool autoConvert, object data ) : void
format string The format associated with the data. See for predefined formats.
autoConvert bool true to allow the data to be converted to another format; otherwise, false.
data object The data to store.
return void

SetData() public method

Stores the specified data and its associated format in this instance.
public SetData ( string format, object data ) : void
format string The format associated with the data. See for predefined formats.
data object The data to store.
return void