internal Object GetValue(UInt32 id) { Object result; lock (accessLock) { if (!streamTypes.ContainsKey(id)) { throw new InvalidOperationException("Stream does not exist or has been closed"); } if (streamValues.ContainsKey(id)) { return(streamValues [id]); } streamValues [id] = Encoder.Decode(streamData [id], streamTypes [id], this.connection); result = streamValues [id]; } return(result); }
public object GetValue(uint id) { CheckDisposed(); object result; lock (accessLock) { if (!streamTypes.ContainsKey(id)) { throw new InvalidOperationException("Stream does not exist or has been closed"); } if (streamValues.ContainsKey(id)) { return(streamValues [id]); } streamValues [id] = Encoder.Decode(streamData [id], streamTypes [id], connection); result = streamValues [id]; } return(result); }