Diffusion .NET Client Library  6.1.5
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
PushTechnology.ClientInterface.Client.Content.ContentFactory Class Reference

Content factory implmentation. More...

Inheritance diagram for PushTechnology.ClientInterface.Client.Content.ContentFactory:
PushTechnology.ClientInterface.Client.Content.IContentFactory PushTechnology.ClientInterface.Client.Content.IRecordFactory

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...
 

Detailed Description

Content factory implmentation.

Member Function Documentation

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.

Template Parameters
TBThe builder type.
Returns
A new builder of the given type.

Implements PushTechnology.ClientInterface.Client.Content.IContentFactory.

Type Constraints
TB :class 
TB :IContentBuilder<TB> 
IContent PushTechnology.ClientInterface.Client.Content.ContentFactory.NewContent ( byte[]  bytes)

Convenience method to create simple byte content.

Parameters
bytesThe bytes that comprise the content.
Returns
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.

Parameters
valueThe content value. Null will be represented as empty content.
Returns
The 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.

Parameters
metadataThe metadata to use.
Returns
A new structured record builder.

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.

Template Parameters
TRThe reader type.
Parameters
contentThe content to read.
Returns
A new reader of the given type.

Implements PushTechnology.ClientInterface.Client.Content.IContentFactory.

Type Constraints
TR :class 
TR :IContentReader 
IRecord PushTechnology.ClientInterface.Client.Content.ContentFactory.NewRecord ( params string[]  fields)

Create a new record comprising the supplied field values.

Parameters
fieldsAn array of field values to populate the record.
Returns
A new immutable record populated with the supplied field values.

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.

Parameters
fieldsA collection of field values to populate the record. If null then an empty record is created.
Returns
A new immutable record populated with the supplied field values.

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.

Parameters
metadataThe metadata to use.
Returns
A new structured record builder.

Implements PushTechnology.ClientInterface.Client.Content.IRecordFactory.

IRecordBuilder PushTechnology.ClientInterface.Client.Content.ContentFactory.NewRecordBuilder ( )

Returns a new record builder.

Returns
A new record builder.

Implements PushTechnology.ClientInterface.Client.Content.IRecordFactory.


The documentation for this class was generated from the following file: