/// <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 (OnOperation other in Operations)
            {
                if (other.Operation == operation)
                    AddError(ErrorCode.InvalidOperation, EdmSchemaErrorSeverity.Error, reader, System.Data.Entity.Strings.DuplicationOperation(reader.Name));
            }

            OnOperation onOperation = new OnOperation(this, operation);
            onOperation.Parse(reader);
            _operations.Add(onOperation);
        }
예제 #2
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)
        {
            Debug.Assert(reader != null);

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

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