Properties
ContainsHtml
#Gets a value indicating whether this IDataObject contains a value for Html.
Value:
true if the data object contains html; otherwise, false.ContainsImage
#Gets a value indicating whether this IDataObject contains a value for Image.
Value:
true if the data object contains an image; otherwise, false.ContainsText
#Gets a value indicating whether this IDataObject contains a value for Text.
Value:
true if the data object contains text; otherwise, false.ContainsUris
#Gets a value indicating whether this IDataObject contains a value for Uris.
Remarks: This can be a mix of both URL and File objects. You can use Uri.IsFile to test for that. On some platforms, (e.g. windows), only a single URL can be retrieved or set.
Value:
true if the data object contains uris; otherwise, false.Html
#Gets or sets html text in the data object.
Value: The html value in the data object, or null if no html in the data object.
Image
#Gets or sets an image in the data object.
Value: The image in the data object, or null if no image is in the data object.
Text
#Gets or sets the plain text in the data object.
Value: The plain text in the data object, or null if no plain text string in the data object.
Types
#Gets the type id's for each type of data in the data object.
Value: The content types in the data object.
Uris
#Gets or sets the Uri's of the files in the data object.
Remarks: This can be a mix of both URL and File objects. You can use Uri.IsFile to test for that. On some platforms, (e.g. windows), only a single URL can be retrieved or set.
Value: The uris of the files, or null if no files are in the data object.
Methods
Contains
#Gets a value indicating that data with the specified type is contained in the data object.
Parameters:
| type (string) | Type to test. |
Returns:
true if the data object contains the specified type, false otherwise.GetData
#Gets a data array from the data object with the specified type identifier.
Parameters:
| type (string) | Type identifier that was used to store the data. |
Returns: The data array, or null if not found in the data object.
See Also: SetData(byte[], string)
GetObject
#Gets an object from the data object with the specified type
Remarks: This is useful when you know the type of object, and it is serializable or has a type converter to convert from string. If it cannot be converted it will return the default value.
Parameters:
| type (string) | Type identifier to get from the data object |
| objectType (Type) | Type of the object to get, or null to detect type |
Returns: An instance of the object to recieve, or the default value.
GetObject
#Gets a serialized value with the specified
type identifier.Parameters:
| type (string) | type identifier to get the value for. |
Returns: Value of the object if deserializable, otherwise null.
GetObject<T>
#Gets an object from the data object with the specified type
Remarks: This is useful when you know the type of object, and it is serializable or has a type converter to convert from string. If it cannot be converted it will return the default value.
Parameters:
| type (string) | Type identifier to get from the data object |
Returns: An instance of the object to recieve, or the default value.
GetString
#Gets a string from the data object with the specified type identifier.
Parameters:
| type (string) | Type identifier that was used to store the data. |
Returns: The string.
See Also: SetString(string, string)
SetData
#sets a data array into the data object with the specified type identifier.
SetObject
#Sets the
value into the data object with the specified type using serialization or type converterSetString
#Sets a string into the data object with the specified type identifier.
Remarks: This is useful when setting alternate string values into the data object that are not plain text. If you are storing plain text, use the Text property instead.
Parameters:
| value (string) | Value to set in the data object. |
| type (string) | Type identifier that was used to store the data. |
See Also: GetString(string)