Microsoft.SqlServer.TDS.SessionState.TDSSessionStateDateFirstDateFormatOption.Inflate C# (CSharp) Method

Inflate() public method

Inflate from stream
public Inflate ( Stream source ) : bool
source Stream
return bool
        public override bool Inflate(Stream source)
        {
            // Reset inflation size
            InflationSize = 0;

            // NOTE: state ID is skipped because it is read by the construction factory

            // Read the value
            byte[] value = InflateValue(source);

            // Read the first byte
            DateFirst = value[0];  // VSTS# 1023839 - OIPI documentation for session state #2 (datefirst) is incorrect

            // Read the second byte
            DateFormat = _ToEnum(value[1]);

            // Inflation is complete
            return true;
        }