RFA .NET
Allows setting select types from their respective string representation.

Namespace: ThomsonReuters.RFA.Data
Assembly: RFA8_NET110_x64 (in RFA8_NET110_x64.dll) Version: 8.0.1.1

Syntax

C#
public void SetFromString(
	RFA_String value,
	byte dataBufferType
)
Visual Basic
Public Sub SetFromString ( _
	value As RFA_String, _
	dataBufferType As Byte _
)
Visual C++
public:
void SetFromString(
	RFA_String^ value, 
	unsigned char dataBufferType
)
F#
member SetFromString : 
        value:RFA_String * 
        dataBufferType:byte -> unit 

Parameters

value
Type: ThomsonReuters.RFA.Common..::..RFA_String
A RFA_String data.
dataBufferType
Type: System..::..Byte
The type of DataBuffer.

Possible values are defined in DataBuffer..::..DataBufferEnum.

This method does not accept data types of: DateTime, QualityOfServiceInfo and RespStatus.

Remarks

CopyC#
DataBuffer tempDB = new DataBuffer();
RFA_String rfaString = new RFA_String();

tempDB.SetFromString( new RFA_String("-10"), ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.Int );
tempDB.SetFromString( new RFA_String("+10"), ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.Int );
tempDB.SetFromString( new RFA_String("100"), ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.UInt );
tempDB.SetFromString( new RFA_String("-400000000"), ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.Int );
tempDB.SetFromString( new RFA_String("+400000000"), ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.UInt );
tempDB.SetFromString( new RFA_String("-40.00001"), ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.Float );
tempDB.SetFromString( new RFA_String("+40000.006666"), ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.Double );
tempDB.SetFromString( new RFA_String("-40.00001"), ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.Real );
tempDB.SetFromString( new RFA_String("+40000.006666"), ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.Real );
tempDB.SetFromString( new RFA_String("12/31/2009"), ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.Date );
tempDB.SetFromString( new RFA_String("21:10:01:010"), ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.Time );
tempDB.SetFromString( new RFA_String("83"), ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.Enumeration );

rfaString.Set("\x22 Any string (can include binary characters (e.g. \x01))... \x22");
tempDB.SetFromString( rfaString, ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.Buffer );
tempDB.SetFromString( rfaString, ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.Opaque );

rfaString.Set("Any string...");
tempDB.SetFromString( rfaString, ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.StringAscii );
tempDB.SetFromString( rfaString, ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.StringUTF8 );
tempDB.SetFromString( rfaString, ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.StringRMTES );

rfaString.Set("<-- Any XML data... -->");
tempDB.SetFromString( rfaString, ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.XML );

rfaString.Set("Any ANSI_Page data...");
tempDB.SetFromString( rfaString, ThomsonReuters.RFA.Data.DataBuffer.DataBufferEnum.ANSI_Page );

Passing zero length string into this method is equivalent to calling DataBuffer.SetBlankData().

Typical use (note that examples don't call DataBuffer.Clear() or RFA_String.Clear() upon re-use): See Reference Manual of RFA_String for information about using the "length" parameter in the RFA_String contructor and Set() method.

Exceptions

ExceptionCondition
ThomsonReuters.RFA.Common..::..InvalidUsageException Invalid data type.

See Also