Diffusion .NET Client Library
6.1.5
|
Public Member Functions | |
string | Get (string recordName, int recordIndex, string fieldName, int fieldIndex) |
Returns a field value. More... | |
string | Get (string key) |
Returns a field value. More... | |
int | RecordCount (string recordName) |
Returns the actual number of occurrences of a named record. More... | |
int | FieldCount (string recordName, int recordIndex, string fieldName) |
Returns the actual number of occurrences of a named field within a specified record occurrences. More... | |
IRecordV2 | AsValue () |
Creates an immutable IRecordV2 object generated from the model. More... | |
IRecordV2 data model.
A read only model can be created from any IRecordV2 object using the IRecordV2.AsModel(Schema.ISchema) method. The model then provides direct access to the fields within the data. Fields may be accessed either by explicitly specifying the record and field occurrence or by specifying a key of the form: "RecordName(RecordIndex).FieldName(fieldIndex)"
.
Indexes start from 0 and if omitted then 0 is assumed. The record name may also be omitted, in which case the first record definition will be used. This form of addressing is useful when there is only one record definition.
So valid keys would be:
Key |
---|
Description |
<decription>Address(4).AddressLine(3)</decription> <decription>The 4th AddressLine occurrence within the 5th Address record</decription> <decription>Address.Name</decription> <decription>The first (or only) Name field within the first (or only) Address record</decription> <decription>AddressLine(1)</decription> <decription>The 2nd AddressLine field within the first (or only) record</decription> <decription>Name</decription> <decription>The first (or only) Name field within the first (or only) record</decription>
The RecordCount(string) and FieldCount(string, int, string) methods are useful for determining the actual number of occurrences of variable multiplicity items.
Implemented in Version 6.0.
IRecordV2 PushTechnology.ClientInterface.Data.Record.Model.IRecordModel.AsValue | ( | ) |
int PushTechnology.ClientInterface.Data.Record.Model.IRecordModel.FieldCount | ( | string | recordName, |
int | recordIndex, | ||
string | fieldName | ||
) |
Returns the actual number of occurrences of a named field within a specified record occurrences.
For all but variable fields this simply returns the schema defined number of occurrences of the field.
recordName | The record name. |
recordIndex | The record index. |
fieldName | The field name. |
string PushTechnology.ClientInterface.Data.Record.Model.IRecordModel.Get | ( | string | recordName, |
int | recordIndex, | ||
string | fieldName, | ||
int | fieldIndex | ||
) |
Returns a field value.
recordName | The name of the record. |
recordIndex | The index of the record. |
fieldName | The name of the field. |
fieldIndex | The index of the field. |
string PushTechnology.ClientInterface.Data.Record.Model.IRecordModel.Get | ( | string | key | ) |
Returns a field value.
This allows an item to be addressed using a key of the form "RecordName(RecordIndex).FieldName(FieldIndex)"
. Indices may be omitted in which case 0 is assumed. The record part may also be omitted in which case the first occurrence of the first record is assumed.
key | The filed key. |
int PushTechnology.ClientInterface.Data.Record.Model.IRecordModel.RecordCount | ( | string | recordName | ) |
Returns the actual number of occurrences of a named record.
If the record is not variable, this is the same as the defined number of occurrences in the schema.
recordName | The record name. |