Microsoft.Samples.Synchronization.ClientServices.Formatters.SyncReader.CheckItemType C# (CSharp) Method

CheckItemType() protected method

protected CheckItemType ( ReaderItemType type ) : void
type ReaderItemType
return void
        protected void CheckItemType(ReaderItemType type)
        {
            if (_currentType != type)
            {
                throw new InvalidOperationException(string.Format("{0} is not a valid {1} element.", _reader.Name, type));
            }

            _currentNodeRead = true;
        }