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

A record is an immutable collection of string fields and may be used when reading or writing record-based content. More...

Inheritance diagram for PushTechnology.ClientInterface.Client.Content.IRecord:

Public Member Functions

string Get (int index)
 Returns a specific field value within the record. More...
 
IStructuredReader CreateNewReader (IMRecord metadata)
 Returns a structured reader which may be used to read the record using the supplied metadata. More...
 
IStructuredReader CreateNewReader (IMRecord metadata, string emptyFieldValue)
 Returns a structured reader which may be used to read the record using the supplied metadata. More...
 

Properties

ReadOnlyCollection< string > Fields [get]
 Returns the values of all field occurrences within the record. More...
 
int Size [get]
 Returns the size of the record in terms of the number of fields defined within it. More...
 

Detailed Description

A record is an immutable collection of string fields and may be used when reading or writing record-based content.

Content that has been written with record delimiters may be read as IRecords or content that uses only field delimiters can be interpreted as a single record, using an IRecordContentReader.

IRecord metadata can be used for direct field access within a record. Metadata used for records is constrained in the following ways:

  1. A record can have one or more fields defined but cannot have nested records defined for it.
  2. Only string data types are permitted for fields.
  3. Repeating field definitions with fixed multiplicity are permitted anywhere within the record but a repeating field definition with variable multiplicity is only permitted if it is the last field within the record.

The fields within a free-format record are simply positional with no concept of field name or repeating fields. A free-format record can be thought of as having a single optional repeating field with no name.

Records may be built using an IContentBuilder or with metadata using an IStructuredBuilder.

Member Function Documentation

IStructuredReader PushTechnology.ClientInterface.Client.Content.IRecord.CreateNewReader ( IMRecord  metadata)

Returns a structured reader which may be used to read the record using the supplied metadata.

This will allow for empty field values of "" in the record. If any other empty field value is expected, use CreateNewReader(IMRecord,string) instead.

Parameters
metadata
Returns
A new structured reader.
IStructuredReader PushTechnology.ClientInterface.Client.Content.IRecord.CreateNewReader ( IMRecord  metadata,
string  emptyFieldValue 
)

Returns a structured reader which may be used to read the record using the supplied metadata.

Parameters
metadataThe metadata.
emptyFieldValueSpecifies the string that is permitted as an empty field value within the record.
Returns
A new structured reader.
string PushTechnology.ClientInterface.Client.Content.IRecord.Get ( int  index)

Returns a specific field value within the record.

Parameters
indexThe index of the field to return the value for (zero-based).
Returns

Property Documentation

ReadOnlyCollection<string> PushTechnology.ClientInterface.Client.Content.IRecord.Fields
get

Returns the values of all field occurrences within the record.

int PushTechnology.ClientInterface.Client.Content.IRecord.Size
get

Returns the size of the record in terms of the number of fields defined within it.


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