Diffusion .NET Client Library
6.1.5
|
Content factory implmentation. More...
Public Member Functions | |
IRecordStructuredBuilder | NewRecordBuilder (IMRecord metadata) |
Returns a new structured record builder, i.e. one that uses IMRecord metadata, to enable field writes by name. More... | |
IRecordStructuredBuilder | NewDeltaRecordBuilder (IMRecord metadata) |
Returns a new structured record builder (i.e. one that uses IMRecord metadata to enable field writes by name. More... | |
TB | NewBuilder< TB > () |
Creates a new content builder. More... | |
TR | NewReader< TR > (IContent content) |
Creates a new content reader. More... | |
IContent | NewContent (byte[] bytes) |
Convenience method to create simple byte content. More... | |
IContent | NewContent (string value) |
Convenience method to create simple string content. More... | |
IRecord | NewRecord (params string[] fields) |
Create a new record comprising the supplied field values. More... | |
IRecord | NewRecord (ICollection< object > fields) |
Create a new record comprising the supplied field values. More... | |
IRecordBuilder | NewRecordBuilder () |
Returns a new record builder. More... | |
Content factory implmentation.
TB PushTechnology.ClientInterface.Client.Content.ContentFactory.NewBuilder< TB > | ( | ) |
Creates a new content builder.
To create a content builder you need to specify the class (interface) of the builder subtype that you wish to use.
TB | The builder type. |
Implements PushTechnology.ClientInterface.Client.Content.IContentFactory.
TB | : | class | |
TB | : | IContentBuilder<TB> |
IContent PushTechnology.ClientInterface.Client.Content.ContentFactory.NewContent | ( | byte[] | bytes | ) |
Convenience method to create simple byte content.
bytes | The bytes that comprise the content. |
Implements PushTechnology.ClientInterface.Client.Content.IContentFactory.
IContent PushTechnology.ClientInterface.Client.Content.ContentFactory.NewContent | ( | string | value | ) |
Convenience method to create simple string content.
UTF8 byte encoding is used to generate the byte content. If the UTF8 encoding is not available then the platform's default encoding is used.
value | The content value. Null will be represented as empty content. |
Implements PushTechnology.ClientInterface.Client.Content.IContentFactory.
IRecordStructuredBuilder PushTechnology.ClientInterface.Client.Content.ContentFactory.NewDeltaRecordBuilder | ( | IMRecord | metadata | ) |
Returns a new structured record builder (i.e. one that uses IMRecord metadata to enable field writes by name.
The record will have all fields initialised to the value that would indicate no change in a delta (i.e. a zero-length string).
This differs from IRecordFactory.NewRecordBuilder() in that it may be used to build record content that may be used to perform delta updates of topics.
It should be noted that repeating fields will have the minimum number of occurrences set to zero-length string and will therefore need to be carefully manipulated to produce true deltas.
metadata | The metadata to use. |
Implements PushTechnology.ClientInterface.Client.Content.IRecordFactory.
TR PushTechnology.ClientInterface.Client.Content.ContentFactory.NewReader< TR > | ( | IContent | content | ) |
Creates a new content reader.
To create a content builder you need to specify the class (interface) of the reader subtype that you wish to use.
TR | The reader type. |
content | The content to read. |
Implements PushTechnology.ClientInterface.Client.Content.IContentFactory.
TR | : | class | |
TR | : | IContentReader |
IRecord PushTechnology.ClientInterface.Client.Content.ContentFactory.NewRecord | ( | params string[] | fields | ) |
Create a new record comprising the supplied field values.
fields | An array of field values to populate the record. |
Implements PushTechnology.ClientInterface.Client.Content.IRecordFactory.
IRecord PushTechnology.ClientInterface.Client.Content.ContentFactory.NewRecord | ( | ICollection< object > | fields | ) |
Create a new record comprising the supplied field values.
fields | A collection of field values to populate the record. If null then an empty record is created. |
Implements PushTechnology.ClientInterface.Client.Content.IRecordFactory.
IRecordStructuredBuilder PushTechnology.ClientInterface.Client.Content.ContentFactory.NewRecordBuilder | ( | IMRecord | metadata | ) |
Returns a new structured record builder, i.e. one that uses IMRecord metadata, to enable field writes by name.
metadata | The metadata to use. |
Implements PushTechnology.ClientInterface.Client.Content.IRecordFactory.
IRecordBuilder PushTechnology.ClientInterface.Client.Content.ContentFactory.NewRecordBuilder | ( | ) |
Returns a new record builder.
Implements PushTechnology.ClientInterface.Client.Content.IRecordFactory.