Container for session recovery data
Inheritance: IInflatable, IDeflatable
        /// <summary>
        /// Inflate the token
        /// </summary>
        /// <param name="source">Stream to inflate the token from</param>
        /// <returns>TRUE if inflation is complete</returns>        
        public override bool Inflate(Stream source)
        {
            // Reset inflation size
            InflationSize = 0;

            // We skip option identifier because it was read by construction factory

            // Read the length of the data for the option
            uint optionDataLength = TDSUtilities.ReadUInt(source);

            // Update inflation offset
            InflationSize += sizeof(uint);

            // Check if we still have space to read
            if (InflationSize >= optionDataLength)
            {
                // Inflation is complete
                return true;
            }

            // Inflate initial data set
            Initial = new TDSSessionRecoveryData(source);

            // Update inflation size with initial data set
            InflationSize += Initial.InflationSize;

            // Check if we still have space to read
            if (InflationSize >= optionDataLength)
            {
                // Inflation is complete
                return true;
            }

            // Inflate delta data set
            Current = new TDSSessionRecoveryData(source);

            // Update inflation size with initial data set
            InflationSize += Current.InflationSize;

            return true;
        }
        /// <summary>
        /// Indlate recovery data
        /// </summary>
        private void _InflateRecoveryData(TDSSessionRecoveryData data)
        {
            // Check if database is available
            if (data.Database != null)
            {
                // Apply database
                Database = data.Database;
            }

            // Check if language is available
            if (data.Language != null)
            {
                // Apply language
                Language = LanguageString.ToEnum(data.Language);
            }

            // Check if collation is available
            if (data.Collation != null)
            {
                Collation = data.Collation;
            }

            // Traverse all session states and inflate each separately
            foreach (TDSSessionStateOption option in data.Options)
            {
                // Check on the options
                if (option is TDSSessionStateUserOptionsOption)
                {
                    // Cast to specific option
                    TDSSessionStateUserOptionsOption specificOption = option as TDSSessionStateUserOptionsOption;

                    // Transfer properties from the session state onto the session
                    AnsiWarnings = specificOption.AnsiWarnings;
                    AnsiNulls = specificOption.AnsiNulls;
                    CursorCloseOnCommit = specificOption.CursorCloseOnCommit;
                    QuotedIdentifier = specificOption.QuotedIdentifier;
                    ConcatNullYieldsNull = specificOption.ConcatNullYieldsNull;
                    AnsiNullDefaultOn = specificOption.AnsiNullDefaultOn;
                    AnsiPadding = specificOption.AnsiPadding;
                    ArithAbort = specificOption.ArithAbort;
                    TransactionAbortOnError = specificOption.TransactionAbortOnError;
                    NoCount = specificOption.NoCount;
                    ArithIgnore = specificOption.ArithIgnore;
                    ImplicitTransactions = specificOption.ImplicitTransactions;
                    NumericRoundAbort = specificOption.NumericRoundAbort;
                }
                else if (option is TDSSessionStateDateFirstDateFormatOption)
                {
                    // Cast to specific option
                    TDSSessionStateDateFirstDateFormatOption specificOption = option as TDSSessionStateDateFirstDateFormatOption;

                    // Transfer properties from the session state onto the session
                    DateFirst = specificOption.DateFirst;
                    DateFormat = specificOption.DateFormat;
                }
                else if (option is TDSSessionStateDeadlockPriorityOption)
                {
                    // Cast to specific option
                    TDSSessionStateDeadlockPriorityOption specificOption = option as TDSSessionStateDeadlockPriorityOption;

                    // Transfer properties from the session state onto the session
                    DeadlockPriority = specificOption.Value;
                }
                else if (option is TDSSessionStateLockTimeoutOption)
                {
                    // Cast to specific option
                    TDSSessionStateLockTimeoutOption specificOption = option as TDSSessionStateLockTimeoutOption;

                    // Transfer properties from the session state onto the session
                    LockTimeout = specificOption.Value;
                }
                else if (option is TDSSessionStateISOFipsOption)
                {
                    // Cast to specific option
                    TDSSessionStateISOFipsOption specificOption = option as TDSSessionStateISOFipsOption;

                    // Transfer properties from the session state onto the session
                    TransactionIsolationLevel = specificOption.TransactionIsolationLevel;
                }
                else if (option is TDSSessionStateTextSizeOption)
                {
                    // Cast to specific option
                    TDSSessionStateTextSizeOption specificOption = option as TDSSessionStateTextSizeOption;

                    // Transfer properties from the session state onto the session
                    TextSize = specificOption.Value;
                }
                else if (option is TDSSessionStateContextInfoOption)
                {
                    // Cast to specific option
                    TDSSessionStateContextInfoOption specificOption = option as TDSSessionStateContextInfoOption;

                    // Transfer properties from the session state onto the session
                    ContextInfo = specificOption.Value;
                }
            }
        }
        /// <summary>
        /// Inflate the session state using options
        /// </summary>
        public virtual void Inflate(TDSSessionRecoveryData initial, TDSSessionRecoveryData current)
        {
            // Check if we have an initial state
            if (initial != null)
            {
                // Save initial values
                _InflateRecoveryData(initial);
            }

            // Check if we have a current value
            if (current != null)
            {
                // Update values with current
                _InflateRecoveryData(current);
            }
        }