Class SessionDataItem
This class represents the contents of a data item that can be attached to a session
Namespace: MESL.SqlRace.Domain
Assembly: MESL.SqlRace.Domain.dll
Syntax
public class SessionDataItem : EntityBase
Remarks
Data Items may also be attached to laps via a LapDataItem.
Constructors
SessionDataItem(String, Boolean)
Initialises a new instance of the SessionDataItem class.
Declaration
public SessionDataItem(string name, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the session data item. |
System.Boolean | value | The boolean value |
SessionDataItem(String, Byte[])
Initialises a new instance of the SessionDataItem class. Throws an exception if the byte data array size is greater than 50MBytes
Declaration
public SessionDataItem(string name, byte[] value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the session data item. |
System.Byte[] | value | The byte data value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown if the the byte data array size is greater than 50MBytes. |
SessionDataItem(String, DateTime)
Initialises a new instance of the SessionDataItem class.
Declaration
public SessionDataItem(string name, DateTime value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the session data item. |
System.DateTime | value | The datetime value. |
SessionDataItem(String, Double)
Initialises a new instance of the SessionDataItem class.
Declaration
public SessionDataItem(string name, double value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the session data item. |
System.Double | value | The double value. |
SessionDataItem(String, Int64)
Initialises a new instance of the SessionDataItem class.
Declaration
public SessionDataItem(string name, long value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the session data item. |
System.Int64 | value | The long value. |
SessionDataItem(String, String)
Initialises a new instance of the SessionDataItem class.
Declaration
public SessionDataItem(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the session data item. |
System.String | value | The string value. |
Fields
MaxBinaryItemSize
Maximum size of binary data (in bytes) allowed on a session data item.
Declaration
public const int MaxBinaryItemSize = 52428800
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
Name
Gets or sets the name of the item.
Declaration
public string Name { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
Value
Gets or sets the value held in the data item if the data item is a simple type. For binary data this will return an empty byte array. Binary data will only be retrieved on explicit request.
Declaration
public object Value { get; protected set; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
ToString()
Returns a System.String that represents the current System.Object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents the current System.Object. |