Interface IContent
Data content.
Namespace: PushTechnology.ClientInterface.Client.Content
Assembly: Diffusion.Client.dll
Syntax
public interface IContent : IBytes
Remarks
Content can represent the value of a topic.
Deprecated: This interface is preserved only for backwards compatibility and is being phased out in favor of specific data types. The only remaining places where it must be used are in some of the IMessaging methods and in the Fetch(String, IFetchStream) interface. In all other cases its use should be avoided - use the superinterface in preference.
Methods
AsString()
Returns the content as a string.
Declaration
string AsString()
Returns
Type | Description |
---|---|
String | The content as a string created by parsing the bytes as UTF-8. |
Remarks
The byte content is converted to a string using UTF-8 encoding.
ToBytes()
Returns the content as an array of bytes.
Declaration
byte[] ToBytes()
Returns
Type | Description |
---|---|
Byte[] | The internal array of bytes that represents the content. |
Remarks
This actually returns the internal byte array which must not be altered. If this data is to be manipulated in any way, it must first be copied.