Example #1
0
        /// <summary>
        ///     Handle an On&lt;Operation&gt; element
        /// </summary>
        /// <param name="reader"> reader positioned at the element </param>
        /// <param name="operation"> the kind of operation being handled </param>
        private void HandleOnOperationElement(XmlReader reader, Operation operation)
        {
            DebugCheck.NotNull(reader);

            foreach (var other in Operations)
            {
                if (other.Operation == operation)
                {
                    AddError(ErrorCode.InvalidOperation, EdmSchemaErrorSeverity.Error, reader, Strings.DuplicationOperation(reader.Name));
                }
            }

            var onOperation = new OnOperation(this, operation);

            onOperation.Parse(reader);
            _operations.Add(onOperation);
        }
        /// <summary>
        /// Handle an On&lt;Operation&gt; element
        /// </summary>
        /// <param name="reader">reader positioned at the element</param>
        /// <param name="operation">the kind of operation being handled</param>
        private void HandleOnOperationElement(XmlReader reader, Operation operation)
        {
            Debug.Assert(reader != null);

            foreach (var other in Operations)
            {
                if (other.Operation == operation)
                {
                    AddError(ErrorCode.InvalidOperation, EdmSchemaErrorSeverity.Error, reader, Strings.DuplicationOperation(reader.Name));
                }
            }

            var onOperation = new OnOperation(this, operation);
            onOperation.Parse(reader);
            _operations.Add(onOperation);
        }