示例#1
0
        public static bool TryParse(XmlReader reader, IEdmModel reference, out IEdmModel model, out IEnumerable <EdmError> errors)
        {
            EdmxReader edmxReader = new EdmxReader(reader);

            IEdmModel[] edmModelArray = new IEdmModel[1];
            edmModelArray[0] = reference;
            return(edmxReader.TryParse(edmModelArray, out model, out errors));
        }
示例#2
0
        private void ParseEdmxElement(Version edmxVersion)
        {
            Version version        = null;
            string  attributeValue = this.GetAttributeValue(null, "Version");

            if (attributeValue != null && (!EdmxReader.TryParseVersion(attributeValue, out version) || version != edmxVersion))
            {
                this.RaiseError(EdmErrorCode.InvalidVersionNumber, Strings.EdmxParser_EdmxVersionMismatch);
            }
            this.ParseElement("Edmx", this.edmxParserLookup);
        }
示例#3
0
        private void ParseDataServicesElement()
        {
            string attributeValue = this.GetAttributeValue("http://schemas.microsoft.com/ado/2007/08/dataservices/metadata", "DataServiceVersion");

            if (attributeValue != null && !EdmxReader.TryParseVersion(attributeValue, out this.dataServiceVersion))
            {
                this.RaiseError(EdmErrorCode.InvalidVersionNumber, Strings.EdmxParser_EdmxDataServiceVersionInvalid);
            }
            string str = this.GetAttributeValue("http://schemas.microsoft.com/ado/2007/08/dataservices/metadata", "MaxDataServiceVersion");

            if (str != null && !EdmxReader.TryParseVersion(str, out this.maxDataServiceVersion))
            {
                this.RaiseError(EdmErrorCode.InvalidVersionNumber, Strings.EdmxParser_EdmxMaxDataServiceVersionInvalid);
            }
            this.ParseTargetElement("DataServices", this.dataServicesParserLookup);
        }
示例#4
0
		public static bool TryParse(XmlReader reader, IEnumerable<IEdmModel> references, out IEdmModel model, out IEnumerable<EdmError> errors)
		{
			EdmxReader edmxReader = new EdmxReader(reader);
			return edmxReader.TryParse(references, out model, out errors);
		}
示例#5
0
		public static bool TryParse(XmlReader reader, IEdmModel reference, out IEdmModel model, out IEnumerable<EdmError> errors)
		{
			EdmxReader edmxReader = new EdmxReader(reader);
			IEdmModel[] edmModelArray = new IEdmModel[1];
			edmModelArray[0] = reference;
			return edmxReader.TryParse(edmModelArray, out model, out errors);
		}
示例#6
0
		public static bool TryParse(XmlReader reader, out IEdmModel model, out IEnumerable<EdmError> errors)
		{
			EdmxReader edmxReader = new EdmxReader(reader);
			return edmxReader.TryParse(Enumerable.Empty<IEdmModel>(), out model, out errors);
		}
示例#7
0
        public static bool TryParse(XmlReader reader, IEnumerable <IEdmModel> references, out IEdmModel model, out IEnumerable <EdmError> errors)
        {
            EdmxReader edmxReader = new EdmxReader(reader);

            return(edmxReader.TryParse(references, out model, out errors));
        }
示例#8
0
        public static bool TryParse(XmlReader reader, out IEdmModel model, out IEnumerable <EdmError> errors)
        {
            EdmxReader edmxReader = new EdmxReader(reader);

            return(edmxReader.TryParse(Enumerable.Empty <IEdmModel>(), out model, out errors));
        }