Gets the StateServerKey element at the specified index.
Namespace: Soss.Client
Assembly: soss_svcdotnet (in soss_svcdotnet.dll) Version: 6.2.0.0 (1.0.0.0)
Syntax
Parameters
- index
- Type: System.Int32
The index of the element to get.
Return Value
Type: StateServerKeythe StateServerKey element at the specified index.
Remarks
IndexCollection indexValues = new IndexCollection(); indexValues[2] = new IndexValue("GOOG"); QueryResult qr = Query(indexValues); foreach (StateServerKey key in qr) { // Use the DataAccessor factory method to create a // DataAccessor from the key. Note that by default, // LockWhenReading will be set to true on the // newly-created DataAccessor. DataAccessor da = DataAccessor.CreateDataAccessor(key); // Read the contents of the object in from StateServer. // When the read completes, the object will be locked. MyObject myObject = (MyObject) da.ReadObject(); ... peform some operation(s) on myObject ... da.Update(myObject); // releases the lock }
See Also