666 references to XmlConstants
System.Data.Services (666)
parent\Client\System\Data\Services\Client\BatchStream.cs (29)
296if (String.Equals(XmlConstants.MimeMultiPartMixed, mime, StringComparison.OrdinalIgnoreCase)) 302if (String.Equals(parameter.Key, XmlConstants.HttpMultipartBoundary, StringComparison.OrdinalIgnoreCase)) 547if (this.contentHeaders.TryGetValue(XmlConstants.HttpContentType, out contentType)) 549if (String.Equals(contentType, XmlConstants.MimeApplicationHttp, StringComparison.OrdinalIgnoreCase)) 557XmlConstants.HttpContentType, 558XmlConstants.HttpContentTransferEncoding); 562if (!this.contentHeaders.TryGetValue(XmlConstants.HttpContentTransferEncoding, out transferEncoding) || 563XmlConstants.BatchRequestContentTransferEncoding != transferEncoding) 566XmlConstants.HttpContentTransferEncoding, 567XmlConstants.BatchRequestContentTransferEncoding); 585XmlConstants.HttpContentType, 587XmlConstants.MimeApplicationHttp, 588XmlConstants.MimeMultiPartMixed); 595(this.contentHeaders.Count == 2 && !this.contentHeaders.ContainsKey(XmlConstants.HttpContentLength))) 597throw Error.BatchStreamInvalidNumberOfHeadersAtChangeSetStart(XmlConstants.HttpContentType, XmlConstants.HttpContentLength); 603XmlConstants.HttpContentType, 605XmlConstants.MimeApplicationHttp, 606XmlConstants.MimeMultiPartMixed); 611throw Error.BatchStreamMissingContentTypeHeader(XmlConstants.HttpContentType); 622this.contentHeaders.TryGetValue(XmlConstants.HttpContentType, out contentType); 632if (this.contentHeaders.TryGetValue(XmlConstants.HttpContentLength, out text)) 780if (XmlConstants.HttpMethodGet.Equals(methodName, StringComparison.Ordinal)) 784else if (XmlConstants.HttpMethodDelete.Equals(methodName, StringComparison.Ordinal)) 788else if (XmlConstants.HttpMethodPost.Equals(methodName, StringComparison.Ordinal)) 792else if (XmlConstants.HttpMethodPut.Equals(methodName, StringComparison.Ordinal)) 796else if (XmlConstants.HttpMethodMerge.Equals(methodName, StringComparison.Ordinal)) 1373if (httpVersion != XmlConstants.HttpVersionInBatching) 1375throw Error.BatchStreamInvalidHttpVersionSpecified(httpVersion, XmlConstants.HttpVersionInBatching);
parent\Client\System\Data\Services\Client\XmlUtil.cs (19)
66if (unescaped.StartsWith(XmlConstants.DataWebRelatedNamespace, StringComparison.Ordinal)) 68name = unescaped.Substring(XmlConstants.DataWebRelatedNamespace.Length); 117table.Add(XmlConstants.AtomNamespace); 118table.Add(XmlConstants.DataWebNamespace); 119table.Add(XmlConstants.DataWebMetadataNamespace); 121table.Add(XmlConstants.AtomContentElementName); 125table.Add(XmlConstants.AtomEntryElementName); 126table.Add(XmlConstants.AtomETagAttributeName); 127table.Add(XmlConstants.AtomFeedElementName); 131table.Add(XmlConstants.AtomInlineElementName); 136table.Add(XmlConstants.AtomNullAttributeName); 137table.Add(XmlConstants.AtomPropertiesElementName); 138table.Add(XmlConstants.AtomTitleElementName); 139table.Add(XmlConstants.AtomTypeAttributeName); 141table.Add(XmlConstants.XmlErrorCodeElementName); 142table.Add(XmlConstants.XmlErrorElementName); 143table.Add(XmlConstants.XmlErrorInnerElementName); 144table.Add(XmlConstants.XmlErrorMessageElementName); 145table.Add(XmlConstants.XmlErrorTypeElementName);
System\Data\Services\BatchServiceHost.cs (9)
182get { return this.requestHeaders[XmlConstants.HttpMaxDataServiceVersion]; } 188get { return this.requestHeaders[XmlConstants.HttpDataServiceVersion]; } 245get { return this.responseHeaders[XmlConstants.HttpDataServiceVersion]; } 246set { this.responseHeaders[XmlConstants.HttpDataServiceVersion] = value; } 362return XmlConstants.HttpMethodDelete; 364return XmlConstants.HttpMethodGet; 366return XmlConstants.HttpMethodPost; 368return XmlConstants.HttpMethodMerge; 371return XmlConstants.HttpMethodPut;
System\Data\Services\DataService.cs (29)
619XmlConstants.MimeApplicationAtom, 620XmlConstants.MimeApplicationJson 627XmlConstants.MimeApplicationXml, 628XmlConstants.MimeTextXml, 629XmlConstants.MimeApplicationJson 728if (lastSegmentContainer != null && description.LastSegmentInfo.Identifier != XmlConstants.UriCountSegment) 738XmlConstants.HttpMethodGet); 804host.ResponseCacheControl = XmlConstants.HttpCacheControlNoCache; 1110throw DataServiceException.CreateMethodNotAllowed(Strings.DataService_CannotUpdateSetReferenceLinks, XmlConstants.HttpMethodDelete); 1276exactContentType = new string[] { XmlConstants.MimeMetadata }; 1281XmlConstants.MimeApplicationXml); // inexactContentType 1285exactContentType = new string[] { XmlConstants.MimeApplicationAtomService, XmlConstants.MimeApplicationJson, XmlConstants.MimeApplicationXml }; 1289XmlConstants.MimeApplicationXml); // inexactContentType; 1661if (WebUtil.CompareMimeType(mime, XmlConstants.MimeApplicationJson)) 1665else if (WebUtil.CompareMimeType(mime, XmlConstants.MimeApplicationAtom)) 1672WebUtil.CompareMimeType(mime, XmlConstants.MimeApplicationXml) || 1673WebUtil.CompareMimeType(mime, XmlConstants.MimeApplicationAtomService) || 1674WebUtil.CompareMimeType(mime, XmlConstants.MimeTextXml), 1721host.ResponseVersion = XmlConstants.DataServiceVersion1Dot0 + ";"; 1823XmlConstants.HttpMethodPost); 1840host.ResponseCacheControl = XmlConstants.HttpCacheControlNoCache; 1842string batchBoundary = XmlConstants.HttpMultipartBoundaryBatchResponse + '_' + Guid.NewGuid().ToString(); 1846XmlConstants.MimeMultiPartMixed, 1847XmlConstants.HttpMultipartBoundary, 1854host.ResponseVersion = XmlConstants.DataServiceVersion1Dot0 + ";"; 2391changesetBoundary = XmlConstants.HttpMultipartBoundaryChangesetResponse + '_' + Guid.NewGuid().ToString(); 2626if (batchStream.ContentHeaders.TryGetValue(XmlConstants.HttpContentID, out contentIdValue) && !String.IsNullOrEmpty(contentIdValue))
System\Data\Services\DataServiceConfiguration.cs (12)
638return XmlConstants.HttpMethodGet; 642return XmlConstants.HttpMethodPost; 673AppendRight(rights, EntitySetRights.ReadSingle, XmlConstants.HttpMethodGet, result); 674AppendRight(rights, EntitySetRights.WriteReplace, XmlConstants.HttpMethodPut, result); 677AppendRight(rights, EntitySetRights.WriteMerge, XmlConstants.HttpMethodMerge, result); 678AppendRight(rights, EntitySetRights.WriteDelete, XmlConstants.HttpMethodDelete, result); 683AppendRight(rights, EntitySetRights.ReadMultiple, XmlConstants.HttpMethodGet, result); 684AppendRight(rights, EntitySetRights.WriteAppend, XmlConstants.HttpMethodPost, result); 951MethodInfo method = type.GetMethod(XmlConstants.ClrServiceInitializationMethodName, flags, null, new Type[] { typeof(IDataServiceConfiguration) }, null); 954method = type.GetMethod(XmlConstants.ClrServiceInitializationMethodName, flags, null, new Type[] { typeof(DataServiceConfiguration) }, null); 960Debug.Assert(method.Name == XmlConstants.ClrServiceInitializationMethodName, "Making sure that the method name is as expected"); 1130string message = Strings.DataServiceConfiguration_NoChangesAllowed(XmlConstants.ClrServiceInitializationMethodName);
System\Data\Services\DataServiceHostWrapper.cs (5)
152case XmlConstants.HttpMethodGet: 156case XmlConstants.HttpMethodPost: 160case XmlConstants.HttpMethodPut: 164case XmlConstants.HttpMethodMerge: 168case XmlConstants.HttpMethodDelete:
System\Data\Services\DataServiceOperationContext.cs (1)
84if (segments.Length > 0 && segments[0] == XmlConstants.UriBatchSegment)
System\Data\Services\DelegateBodyWriter.cs (1)
60writer.WriteStartElement(XmlConstants.WcfBinaryElementName);
System\Data\Services\Epm\EpmAttributeNameBuilder.cs (6)
36return XmlConstants.MetadataAttributeEpmKeepInContent + this.postFix; 45return XmlConstants.MetadataAttributeEpmSourcePath + this.postFix; 54return XmlConstants.MetadataAttributeEpmTargetPath + this.postFix; 63return XmlConstants.MetadataAttributeEpmContentKind + this.postFix; 72return XmlConstants.MetadataAttributeEpmNsPrefix + this.postFix; 81return XmlConstants.MetadataAttributeEpmNsUri + this.postFix;
System\Data\Services\Epm\EpmHelper.cs (15)
216string extendedPropertyName = System.Data.Services.XmlConstants.DataWebMetadataNamespace + ":" + propertyName; 252case System.Data.Services.XmlConstants.SyndAuthorEmail: 255case System.Data.Services.XmlConstants.SyndAuthorName: 258case System.Data.Services.XmlConstants.SyndAuthorUri: 261case System.Data.Services.XmlConstants.SyndContributorEmail: 264case System.Data.Services.XmlConstants.SyndContributorName: 267case System.Data.Services.XmlConstants.SyndContributorUri: 270case System.Data.Services.XmlConstants.SyndUpdated: 273case System.Data.Services.XmlConstants.SyndPublished: 276case System.Data.Services.XmlConstants.SyndRights: 279case System.Data.Services.XmlConstants.SyndSummary: 282case System.Data.Services.XmlConstants.SyndTitle: 306case System.Data.Services.XmlConstants.SyndContentKindPlaintext: 309case System.Data.Services.XmlConstants.SyndContentKindHtml: 312case System.Data.Services.XmlConstants.SyndContentKindXHtml:
System\Data\Services\ErrorHandler.cs (33)
79host.ResponseVersion = XmlConstants.DataServiceVersion1Dot0 + ";"; 140host.ResponseVersion = XmlConstants.DataServiceVersion1Dot0 + ";"; 254if (WebUtil.CompareMimeType(args.ResponseContentType, XmlConstants.MimeApplicationJson)) 297string elementName = XmlConstants.JsonErrorInner; 306writer.WriteName(XmlConstants.JsonErrorMessage); 310writer.WriteName(XmlConstants.JsonErrorType); 314writer.WriteName(XmlConstants.JsonErrorStackTrace); 318elementName = XmlConstants.JsonErrorInternalException; 333string elementName = XmlConstants.XmlErrorInnerElementName; 340writer.WriteStartElement(elementName, XmlConstants.DataWebMetadataNamespace); 344writer.WriteStartElement(XmlConstants.XmlErrorMessageElementName, XmlConstants.DataWebMetadataNamespace); 349writer.WriteStartElement(XmlConstants.XmlErrorTypeElementName, XmlConstants.DataWebMetadataNamespace); 354writer.WriteStartElement(XmlConstants.XmlErrorStackTraceElementName, XmlConstants.DataWebMetadataNamespace); 359elementName = XmlConstants.XmlErrorInternalExceptionElementName; 395string[] availableTypes = new string[] { XmlConstants.MimeApplicationXml, XmlConstants.MimeApplicationJson }; 416contentType = contentType ?? XmlConstants.MimeApplicationXml; 426writer.WriteName(XmlConstants.JsonError); 432writer.WriteName(XmlConstants.JsonErrorCode); 435writer.WriteName(XmlConstants.JsonErrorMessage); 437writer.WriteName(XmlConstants.XmlLangAttributeName); 439writer.WriteName(XmlConstants.JsonErrorValue); 459writer.WriteStartElement(XmlConstants.XmlErrorElementName, XmlConstants.DataWebMetadataNamespace); 463writer.WriteStartElement(XmlConstants.XmlErrorCodeElementName, XmlConstants.DataWebMetadataNamespace); 467writer.WriteStartElement(XmlConstants.XmlErrorMessageElementName, XmlConstants.DataWebMetadataNamespace); 469XmlConstants.XmlNamespacePrefix, // prefix 470XmlConstants.XmlLangAttributeName, // localName
System\Data\Services\HttpContextServiceHost.cs (21)
129string[] methodValues = this.operationContext.IncomingRequest.Headers.GetValues(XmlConstants.HttpXMethod); 137if (this.operationContext.IncomingRequest.Method != XmlConstants.HttpMethodPost) 142if (result != XmlConstants.HttpMethodDelete && result != XmlConstants.HttpMethodPut && result != XmlConstants.HttpMethodMerge) 179return this.operationContext.IncomingRequest.Headers[XmlConstants.HttpMaxDataServiceVersion]; 188return this.operationContext.IncomingRequest.Headers[XmlConstants.HttpDataServiceVersion]; 200if (OperationContext.Current.IncomingMessageProperties.TryGetValue(XmlConstants.MicrosoftDataServicesRequestUri, out property)) 205throw new InvalidOperationException(Strings.HttpContextServiceHost_IncomingMessagePropertyMustBeValidUriInstance(XmlConstants.MicrosoftDataServicesRequestUri)); 290get { return this.operationContext.OutgoingResponse.Headers[XmlConstants.HttpDataServiceVersion]; } 291set { this.operationContext.OutgoingResponse.Headers[XmlConstants.HttpDataServiceVersion] = value; } 302if (OperationContext.Current.IncomingMessageProperties.TryGetValue(XmlConstants.MicrosoftDataServicesRootUri, out property)) 307throw new InvalidOperationException(Strings.HttpContextServiceHost_IncomingMessagePropertyMustBeValidUriInstance(XmlConstants.MicrosoftDataServicesRootUri)); 487if (name != XmlConstants.HttpQueryStringExpand && 488name != XmlConstants.HttpQueryStringFilter && 489name != XmlConstants.HttpQueryStringOrderBy && 490name != XmlConstants.HttpQueryStringSkip && 491name != XmlConstants.HttpQueryStringSkipToken && 492name != XmlConstants.HttpQueryStringInlineCount && 493name != XmlConstants.HttpQueryStringTop && 494name != XmlConstants.HttpQueryStringSelect)
System\Data\Services\HttpProcessUtility.cs (6)
1083if (String.Equals(parameter.Key, XmlConstants.HttpQValueParameter, StringComparison.OrdinalIgnoreCase)) 1119if (String.Equals(parameter.Key, XmlConstants.HttpCharsetParameter, StringComparison.OrdinalIgnoreCase)) 1131if (String.Equals(this.type, XmlConstants.MimeTextType, StringComparison.OrdinalIgnoreCase)) 1139if (String.Equals(this.subType, XmlConstants.MimeXmlSubType, StringComparison.OrdinalIgnoreCase)) 1148else if (String.Equals(this.type, XmlConstants.MimeApplicationType, StringComparison.OrdinalIgnoreCase) && 1149String.Equals(this.subType, XmlConstants.MimeJsonSubType, StringComparison.OrdinalIgnoreCase))
System\Data\Services\Internal\ExpandedWrapper.cs (1)
109if (nameIndex == -1 && name == XmlConstants.HttpQueryStringSkipToken)
System\Data\Services\Parsing\ExpressionLexer.cs (9)
152else if (hasNext && this.text[tokenPos + 1] == XmlConstants.XmlInfinityLiteral[0]) 341if (tokenText[0] == XmlConstants.XmlInfinityLiteral[0]) 346if (tokenText[0] == XmlConstants.XmlNaNLiteral[0]) 348return String.CompareOrdinal(tokenText, 0, XmlConstants.XmlNaNLiteral, 0, 3) == 0; 363return String.CompareOrdinal(text, 0, XmlConstants.XmlInfinityLiteral, 0, text.Length) == 0; 373if (tokenText[0] == XmlConstants.XmlInfinityLiteral[0]) 377else if (tokenText[0] == XmlConstants.XmlNaNLiteral[0]) 380String.CompareOrdinal(tokenText, 0, XmlConstants.XmlNaNLiteral, 0, 3) == 0; 397String.CompareOrdinal(text, 0, XmlConstants.XmlInfinityLiteral, 0, 3) == 0;
System\Data\Services\Parsing\RequestQueryParser.cs (10)
1772return this.ParseTypedLiteral(typeof(bool), XmlConstants.EdmBooleanTypeName, l); 1774return this.ParseTypedLiteral(typeof(DateTime), XmlConstants.EdmDateTimeTypeName, l); 1776return this.ParseTypedLiteral(typeof(decimal), XmlConstants.EdmDecimalTypeName, l); 1783return this.ParseTypedLiteral(typeof(string), XmlConstants.EdmStringTypeName, l); 1785return this.ParseTypedLiteral(typeof(Int64), XmlConstants.EdmInt64TypeName, l); 1787return this.ParseTypedLiteral(typeof(Int32), XmlConstants.EdmInt32TypeName, l); 1789return this.ParseTypedLiteral(typeof(double), XmlConstants.EdmDoubleTypeName, l); 1791return this.ParseTypedLiteral(typeof(Single), XmlConstants.EdmSingleTypeName, l); 1793return this.ParseTypedLiteral(typeof(Guid), XmlConstants.EdmGuidTypeName, l); 1795return this.ParseTypedLiteral(typeof(byte[]), XmlConstants.EdmBinaryTypeName, l);
System\Data\Services\Parsing\WebConvert.cs (15)
53hexBuilder.Append(XmlConstants.XmlBinaryPrefix); 157result = XmlConstants.LiteralPrefixDateTime + "'" + result + "'"; 161result = result + XmlConstants.XmlDecimalLiteralSuffix; 165result = XmlConstants.LiteralPrefixGuid + "'" + result + "'"; 169result = result + XmlConstants.XmlInt64LiteralSuffix; 173result = result + XmlConstants.XmlSingleLiteralSuffix; 181result = result + XmlConstants.XmlDoubleLiteralSuffix; 237if (!TryRemoveLiteralPrefix(XmlConstants.LiteralPrefixBinary, ref text) && 238!TryRemoveLiteralPrefix(XmlConstants.XmlBinaryPrefix, ref text)) 284if (!TryRemoveLiteralPrefix(XmlConstants.LiteralPrefixDateTime, ref text)) 314if (!TryRemoveLiteralPrefix(XmlConstants.LiteralPrefixGuid, ref text)) 423if (TryRemoveLiteralSuffix(XmlConstants.XmlInt64LiteralSuffix, ref text)) 435if (TryRemoveLiteralSuffix(XmlConstants.XmlSingleLiteralSuffix, ref text)) 447TryRemoveLiteralSuffix(XmlConstants.XmlDoubleLiteralSuffix, ref text); 452if (TryRemoveLiteralSuffix(XmlConstants.XmlDecimalLiteralSuffix, ref text))
System\Data\Services\Providers\BaseServiceProvider.cs (2)
509this.AddServiceOperation(methodInfo, XmlConstants.HttpMethodGet); 513this.AddServiceOperation(methodInfo, XmlConstants.HttpMethodPost);
System\Data\Services\Providers\BasicExpandProvider.cs (2)
1512skipTokenDescription.Append(XmlConstants.SkipTokenPropertyPrefix + i.ToString(System.Globalization.CultureInfo.InvariantCulture)).Append(","); 1527Expression.Constant((this.WrapperDescription.Length == 0 ? "" : (this.WrapperDescription + ",")) + XmlConstants.HttpQueryStringSkipToken));
System\Data\Services\Providers\DataServiceStreamProviderWrapper.cs (2)
111if (!result.EndsWith(XmlConstants.UriValueSegment, StringComparison.Ordinal)) 118result += XmlConstants.UriValueSegment;
System\Data\Services\Providers\ObjectContextServiceProvider.cs (70)
665return XmlConstants.SyndContentKindPlaintext; 667return XmlConstants.SyndContentKindHtml; 670return XmlConstants.SyndContentKindXHtml; 684return XmlConstants.SyndAuthorEmail; 686return XmlConstants.SyndAuthorName; 688return XmlConstants.SyndAuthorUri; 690return XmlConstants.SyndContributorEmail; 692return XmlConstants.SyndContributorName; 694return XmlConstants.SyndContributorUri; 696return XmlConstants.SyndUpdated; 698return XmlConstants.SyndPublished; 700return XmlConstants.SyndRights; 702return XmlConstants.SyndSummary; 705return XmlConstants.SyndTitle; 1137const string HasStreamAttribute = XmlConstants.DataWebMetadataNamespace + ":" + XmlConstants.DataWebAccessHasStreamAttribute; 1148if (text != XmlConstants.DataWebAccessDefaultStreamPropertyValue) 1165const string MimePropertyName = XmlConstants.DataWebMetadataNamespace + ":" + XmlConstants.DataWebMimeTypeAttributeName; 1524xmlWriter.WriteAttributeString(XmlConstants.Role, roleName); 1528xmlWriter.WriteStartElement(XmlConstants.PropertyRef); 1529xmlWriter.WriteAttributeString(XmlConstants.Name, property.Name); 1568xmlWriter.WriteAttributeString(facetName, XmlConstants.XmlTrueLiteral); 1572xmlWriter.WriteAttributeString(facetName, XmlConstants.XmlFalseLiteral); 1621if (metadataProperty.Name.Equals(XmlConstants.StoreGeneratedPattern)) 1694multiplicityValue = XmlConstants.Many; 1698multiplicityValue = XmlConstants.One; 1705multiplicityValue = XmlConstants.ZeroOrOne; 1731xmlWriter.WriteStartElement(XmlConstants.Property); 1732xmlWriter.WriteAttributeString(XmlConstants.Name, member.Name); 1733xmlWriter.WriteAttributeString(XmlConstants.Type, member.TypeUsage.EdmType.FullName); 1742xmlWriter.WriteStartElement(XmlConstants.NavigationProperty); 1743xmlWriter.WriteAttributeString(XmlConstants.Name, navProperty.Name); 1744xmlWriter.WriteAttributeString(XmlConstants.Relationship, navProperty.RelationshipType.FullName); 1745xmlWriter.WriteAttributeString(XmlConstants.FromRole, navProperty.FromEndMember.Name); 1746xmlWriter.WriteAttributeString(XmlConstants.ToRole, navProperty.ToEndMember.Name); 1762xmlWriter.WriteStartElement(XmlConstants.AssociationSet); 1763xmlWriter.WriteAttributeString(XmlConstants.Name, associationSet.Name); 1764xmlWriter.WriteAttributeString(XmlConstants.Association, associationSet.ElementType.FullName); 1770xmlWriter.WriteStartElement(XmlConstants.End); 1771xmlWriter.WriteAttributeString(XmlConstants.Role, associationSet.AssociationSetEnds[i].Name); 1772xmlWriter.WriteAttributeString(XmlConstants.EntitySet, associationSet.AssociationSetEnds[i].EntitySet.Name); 1791xmlWriter.WriteStartElement(XmlConstants.EntitySet); 1792xmlWriter.WriteAttributeString(XmlConstants.Name, entitySet.Name); 1793xmlWriter.WriteAttributeString(XmlConstants.EntityType, entitySet.ElementType.FullName); 1838xmlWriter.WriteStartElement(XmlConstants.EntityType); 1839xmlWriter.WriteAttributeString(XmlConstants.Name, entityType.Name); 1842xmlWriter.WriteAttributeString(XmlConstants.Abstract, XmlConstants.XmlTrueLiteral); 1847xmlWriter.WriteAttributeString(XmlConstants.BaseType, entityType.BaseType.FullName); 1858xmlWriter.WriteStartElement(XmlConstants.Key); 1861xmlWriter.WriteStartElement(XmlConstants.PropertyRef); 1862xmlWriter.WriteAttributeString(XmlConstants.Name, member.Name); 1882xmlWriter.WriteStartElement(XmlConstants.ComplexType); 1883xmlWriter.WriteAttributeString(XmlConstants.Name, complexType.Name); 1901xmlWriter.WriteStartElement(XmlConstants.Association); 1902xmlWriter.WriteAttributeString(XmlConstants.Name, associationType.Name); 1909xmlWriter.WriteStartElement(XmlConstants.End); 1910xmlWriter.WriteAttributeString(XmlConstants.Role, end.Name); 1913xmlWriter.WriteAttributeString(XmlConstants.Type, ((RefType)end.TypeUsage.EdmType).ElementType.FullName); 1916xmlWriter.WriteAttributeString(XmlConstants.Multiplicity, GetMultiplicity(end.RelationshipMultiplicity)); 1924xmlWriter.WriteStartElement(XmlConstants.OnDelete); 1925xmlWriter.WriteAttributeString(XmlConstants.Action, end.DeleteBehavior.ToString()); 1935xmlWriter.WriteStartElement(XmlConstants.ReferentialConstraint); 1939WriteReferentialConstraintChildElement(xmlWriter, XmlConstants.Principal, referentialConstraint.FromRole.Name, referentialConstraint.FromProperties); 1940WriteReferentialConstraintChildElement(xmlWriter, XmlConstants.Dependent, referentialConstraint.ToRole.Name, referentialConstraint.ToProperties); 1966xmlWriter.WriteStartElement(XmlConstants.EntityContainer); 1967xmlWriter.WriteAttributeString(XmlConstants.Name, container.Name); 1974xmlWriter, XmlConstants.IsDefaultEntityContainerAttribute, XmlConstants.XmlTrueLiteral);
System\Data\Services\Providers\ResourceAssociationTypeEnd.cs (2)
77return XmlConstants.ZeroOrOne; 80return XmlConstants.Many;
System\Data\Services\Providers\ResourceType.cs (2)
189if (name == "String" && Object.ReferenceEquals(namespaceName, XmlConstants.EdmNamespace)) 191this.fullName = XmlConstants.EdmStringTypeName;
System\Data\Services\Providers\ServiceOperation.cs (2)
88if (method != XmlConstants.HttpMethodGet && method != XmlConstants.HttpMethodPost)
System\Data\Services\RequestQueryProcessor.cs (23)
180(!String.IsNullOrEmpty(host.GetQueryStringItem(XmlConstants.HttpQueryStringExpand)) || 181!String.IsNullOrEmpty(host.GetQueryStringItem(XmlConstants.HttpQueryStringFilter)) || 182!String.IsNullOrEmpty(host.GetQueryStringItem(XmlConstants.HttpQueryStringOrderBy)) || 183!String.IsNullOrEmpty(host.GetQueryStringItem(XmlConstants.HttpQueryStringSkip)) || 184!String.IsNullOrEmpty(host.GetQueryStringItem(XmlConstants.HttpQueryStringTop)))) || 185!String.IsNullOrEmpty(host.GetQueryStringItem(XmlConstants.HttpQueryStringInlineCount)) || 186!String.IsNullOrEmpty(host.GetQueryStringItem(XmlConstants.HttpQueryStringSelect)) || 187!String.IsNullOrEmpty(host.GetQueryStringItem(XmlConstants.HttpQueryStringSkipToken))) 571string expand = this.service.OperationContext.Host.GetQueryStringItem(XmlConstants.HttpQueryStringExpand); 693string select = this.service.OperationContext.Host.GetQueryStringItem(XmlConstants.HttpQueryStringSelect); 834if (!String.IsNullOrEmpty(this.service.OperationContext.Host.GetQueryStringItem(XmlConstants.HttpQueryStringExpand))) 850string filter = this.service.OperationContext.Host.GetQueryStringItem(XmlConstants.HttpQueryStringFilter); 862String skipToken = this.service.OperationContext.Host.GetQueryStringItem(XmlConstants.HttpQueryStringSkipToken); 967string count = this.service.OperationContext.Host.GetQueryStringItem(XmlConstants.HttpQueryStringInlineCount); 980if (count.Equals(XmlConstants.UriRowCountOffOption)) 1002if (count == XmlConstants.UriRowCountAllOption) 1025StringBuilder orderBy = new StringBuilder(this.service.OperationContext.Host.GetQueryStringItem(XmlConstants.HttpQueryStringOrderBy)); 1126if (String.IsNullOrEmpty(this.service.OperationContext.Host.GetQueryStringItem(XmlConstants.HttpQueryStringExpand)) 1127&& String.IsNullOrEmpty(this.service.OperationContext.Host.GetQueryStringItem(XmlConstants.HttpQueryStringSelect))) 1189resultWrapperBindings[1] = Expression.Bind(resultWrapperType.GetProperty("Description"), Expression.Constant(XmlConstants.HttpQueryStringSkipToken)); 1222skipTokenDescription.Append(separator).Append(XmlConstants.SkipTokenPropertyPrefix + i.ToString(System.Globalization.CultureInfo.InvariantCulture)); 1314if (this.ReadSkipOrTopArgument(XmlConstants.HttpQueryStringSkip, out count)) 1325if (this.ReadSkipOrTopArgument(XmlConstants.HttpQueryStringTop, out count))
System\Data\Services\RequestUriProcessor.cs (14)
137lastSegment.Identifier == XmlConstants.UriCountSegment ? 154CountOption = lastSegment.Identifier == XmlConstants.UriCountSegment ? RequestQueryCountOption.ValueOnly : RequestQueryCountOption.None 473if (segment.Identifier == XmlConstants.UriMetadataSegment) 480if (segment.Identifier == XmlConstants.UriBatchSegment) 487if (segment.Identifier == XmlConstants.UriCountSegment) 700else if (postLinkSegment && identifier != XmlConstants.UriCountSegment) 703throw DataServiceException.ResourceNotFoundError(Strings.RequestUriProcessor_CannotSpecifyAfterPostLinkSegment(identifier, XmlConstants.UriLinkSegment)); 709if (identifier != XmlConstants.UriValueSegment) 722identifier == XmlConstants.UriLinkSegment) 746if (!previous.SingleResult && identifier != XmlConstants.UriCountSegment) 772if (identifier == XmlConstants.UriCountSegment) 795else if (identifier == XmlConstants.UriValueSegment && 874throw DataServiceException.CreateBadRequestError(Strings.RequestUriProcessor_LinkSegmentMustBeFollowedByEntitySegment(identifier, XmlConstants.UriLinkSegment)); 936throw DataServiceException.CreateBadRequestError(Strings.RequestUriProcessor_MissingSegmentAfterLink(XmlConstants.UriLinkSegment));
System\Data\Services\ResponseBodyWriter.cs (2)
217string contentType = (this.responseFormat == ContentFormat.Json) ? XmlConstants.MimeApplicationJson : XmlConstants.MimeApplicationXml;
System\Data\Services\Serializers\Atom10FormatterFactory.cs (1)
66value == XmlConstants.XmlTrueLiteral)
System\Data\Services\Serializers\AtomServiceDocumentSerializer.cs (18)
60this.Writer.WriteStartElement(XmlConstants.AtomPublishingServiceElementName, XmlConstants.AppNamespace); 62this.Writer.WriteStartElement("", XmlConstants.AtomPublishingWorkspaceElementName, XmlConstants.AppNamespace); 64this.Writer.WriteStartElement(XmlConstants.AtomTitleElementName, XmlConstants.AtomNamespace); 65this.Writer.WriteString(XmlConstants.AtomPublishingWorkspaceDefaultValue); 70this.Writer.WriteStartElement("", XmlConstants.AtomPublishingCollectionElementName, XmlConstants.AppNamespace); 71this.Writer.WriteAttributeString(XmlConstants.AtomHRefAttributeName, container.Name); 73this.Writer.WriteStartElement(XmlConstants.AtomTitleElementName, XmlConstants.AtomNamespace); 99this.Writer.WriteAttributeString(XmlConstants.XmlNamespacePrefix, XmlConstants.XmlBaseAttributeName, null, this.BaseUri.AbsoluteUri); 100this.Writer.WriteAttributeString(XmlConstants.XmlnsNamespacePrefix, AtomNamespacePrefix, null, XmlConstants.AtomNamespace); 101this.Writer.WriteAttributeString(XmlConstants.XmlnsNamespacePrefix, AppNamespacePrefix, null, XmlConstants.AppNamespace);
System\Data\Services\Serializers\BatchWriter.cs (9)
39XmlConstants.HttpContentType, 40XmlConstants.MimeMultiPartMixed, 41XmlConstants.HttpMultipartBoundary, 59WriteHeaderValue(writer, XmlConstants.HttpContentType, XmlConstants.MimeApplicationHttp); 60WriteHeaderValue(writer, XmlConstants.HttpContentTransferEncoding, XmlConstants.BatchRequestContentTransferEncoding); 65writer.WriteLine("{0} {1} {2}", XmlConstants.HttpVersionInBatching, host.ResponseStatusCode, WebUtil.GetStatusCodeText(host.ResponseStatusCode)); 69WriteHeaderValue(writer, XmlConstants.HttpContentID, contentId);
System\Data\Services\Serializers\DictionaryContent.cs (9)
82get { return XmlConstants.MimeApplicationXml; } 144writer.WriteStartElement(XmlConstants.DataWebMetadataNamespacePrefix, XmlConstants.AtomPropertiesElementName, XmlConstants.DataWebMetadataNamespace); 145writer.WriteAttributeString(XmlConstants.XmlnsNamespacePrefix, XmlConstants.DataWebNamespacePrefix, null, XmlConstants.DataWebNamespace); 191writer.WriteStartElement(XmlConstants.AtomPropertiesElementName, XmlConstants.DataWebMetadataNamespace);
System\Data\Services\Serializers\JsonDeserializer.cs (5)
247if (records != null && records.Count == 1 && records.OrderedKeys[0] == XmlConstants.JsonDeferredString) 299if (metadata.TryGetValue(XmlConstants.JsonUriString, out uriObject)) 535if (propertyName == XmlConstants.JsonMetadataString) 693if (jsonObjectTable.TryGetValue(XmlConstants.JsonMetadataString, out metadataObject)) 705if (metadata.Entries.TryGetValue(XmlConstants.JsonTypeString, out objectTypeName))
System\Data\Services\Serializers\JsonReader.cs (2)
252if (s.Equals(XmlConstants.XmlTrueLiteral, StringComparison.Ordinal)) 256else if (s.Equals(XmlConstants.XmlFalseLiteral, StringComparison.Ordinal))
System\Data\Services\Serializers\JsonSerializer.cs (13)
185this.writer.WriteName(XmlConstants.JsonRowCountString); 292this.writer.WriteName(XmlConstants.JsonNextString); 303this.writer.WriteName(XmlConstants.UriElementName); 393this.writer.WriteName(XmlConstants.JsonMetadataString); 399this.writer.WriteName(XmlConstants.JsonUriString); 406this.writer.WriteName(XmlConstants.JsonETagString); 411this.writer.WriteName(XmlConstants.JsonTypeString); 425this.writer.WriteName(XmlConstants.JsonEditMediaString); 428this.writer.WriteName(XmlConstants.JsonMediaSrcString); 431this.writer.WriteName(XmlConstants.JsonContentTypeString); 436this.writer.WriteName(XmlConstants.JsonMediaETagString); 652this.writer.WriteName(XmlConstants.JsonDeferredString); 654this.writer.WriteName(XmlConstants.JsonUriString);
System\Data\Services\Serializers\JsonWriter.cs (2)
165this.WriteCore(value ? XmlConstants.XmlTrueLiteral : XmlConstants.XmlFalseLiteral, /* quotes */ false);
System\Data\Services\Serializers\MetadataSerializer.cs (105)
62String dataServiceVersion = XmlConstants.DataServiceVersion1Dot0; 69dataServiceVersion = XmlConstants.DataServiceVersion2Dot0; 81if (dataServiceVersion == XmlConstants.DataServiceVersion2Dot0) 86Debug.Assert(dataServiceVersion == XmlConstants.DataServiceVersion1Dot0, "Version is either 1.0 or 2.0 for DataService"); 104writer.WriteStartElement(XmlConstants.EdmxNamespacePrefix, XmlConstants.EdmxElement, XmlConstants.EdmxNamespace); 105writer.WriteAttributeString(XmlConstants.EdmxVersion, XmlConstants.EdmxVersionValue); 108writer.WriteStartElement(XmlConstants.EdmxNamespacePrefix, XmlConstants.EdmxDataServicesElement, XmlConstants.EdmxNamespace); 109writer.WriteAttributeString(XmlConstants.XmlnsNamespacePrefix, XmlConstants.DataWebMetadataNamespacePrefix, null, XmlConstants.DataWebMetadataNamespace); 110writer.WriteAttributeString(XmlConstants.DataWebMetadataNamespacePrefix, XmlConstants.HttpDataServiceVersion, XmlConstants.DataWebMetadataNamespace, dataServiceVersion); 121writer.WriteStartElement(XmlConstants.Schema, GetSchemaNamespace(metadataEdmSchemaVersion)); 122writer.WriteAttributeString(XmlConstants.Namespace, schemaNamespace); 123writer.WriteAttributeString(XmlConstants.XmlnsNamespacePrefix, XmlConstants.DataWebNamespacePrefix, null, XmlConstants.DataWebNamespace); 124writer.WriteAttributeString(XmlConstants.XmlnsNamespacePrefix, XmlConstants.DataWebMetadataNamespacePrefix, null, XmlConstants.DataWebMetadataNamespace); 136writer.WriteAttributeString(XmlConstants.DataWebMetadataNamespacePrefix, name, XmlConstants.DataWebMetadataNamespace, value); 179returnTypeString = String.Format(CultureInfo.InvariantCulture, XmlConstants.EdmCollectionTypeFormat, returnTypeString); 183writer.WriteStartElement(XmlConstants.EdmFunctionImportElementName); 184writer.WriteAttributeString(XmlConstants.Name, operation.Name); 188writer.WriteAttributeString(XmlConstants.EdmEntitySetAttributeName, entitySetName); 193writer.WriteAttributeString(XmlConstants.EdmReturnTypeAttributeName, returnTypeString); 196MetadataSerializer.WriteDataWebMetadata(writer, XmlConstants.ServiceOperationHttpMethodName, operation.Method); 200MetadataSerializer.WriteDataWebMetadata(writer, XmlConstants.DataWebMimeTypeAttributeName, operation.MimeType); 205writer.WriteStartElement(XmlConstants.EdmParameterElementName); 206writer.WriteAttributeString(XmlConstants.Name, parameter.Name); 207writer.WriteAttributeString(XmlConstants.Type, parameter.ParameterType.FullName); 208writer.WriteAttributeString(XmlConstants.EdmModeAttributeName, XmlConstants.EdmModeInValue); 321xmlWriter.WriteStartElement(XmlConstants.EntityType); 322xmlWriter.WriteAttributeString(XmlConstants.Name, XmlConvert.EncodeName(entityType.Name)); 326xmlWriter.WriteAttributeString(XmlConstants.Abstract, "true"); 342XmlConstants.DataWebAccessHasStreamAttribute, 343XmlConstants.DataWebMetadataNamespace, 344XmlConstants.DataWebAccessDefaultStreamPropertyValue); 354xmlWriter.WriteAttributeString(XmlConstants.BaseType, XmlConvert.EncodeName(entityType.BaseType.FullName)); 358xmlWriter.WriteStartElement(XmlConstants.Key); 361xmlWriter.WriteStartElement(XmlConstants.PropertyRef); 362xmlWriter.WriteAttributeString(XmlConstants.Name, property.Name); 391XmlConstants.DataWebMetadataNamespace, 396XmlConstants.DataWebMetadataNamespace, 403XmlConstants.DataWebMetadataNamespace, 411XmlConstants.DataWebMetadataNamespace, 416XmlConstants.DataWebMetadataNamespace, 424XmlConstants.DataWebMetadataNamespace, 430XmlConstants.DataWebMetadataNamespace, 431attr.KeepInContent ? XmlConstants.XmlTrueLiteral : XmlConstants.XmlFalseLiteral); 449xmlWriter.WriteStartElement(XmlConstants.ComplexType); 450xmlWriter.WriteAttributeString(XmlConstants.Name, XmlConvert.EncodeName(complexType.Name)); 461xmlWriter.WriteAttributeString(XmlConstants.DataWebOpenTypeAttributeName, XmlConstants.XmlTrueLiteral); 487xmlWriter.WriteStartElement(XmlConstants.Property); 488xmlWriter.WriteAttributeString(XmlConstants.Name, resourceProperty.Name); 489xmlWriter.WriteAttributeString(XmlConstants.Type, resourceProperty.ResourceType.FullName); 493MetadataSerializer.WriteDataWebMetadata(xmlWriter, XmlConstants.DataWebMimeTypeAttributeName, resourceProperty.MimeType); 499xmlWriter.WriteAttributeString(XmlConstants.ConcurrencyAttribute, XmlConstants.ConcurrencyFixedValue); 510xmlWriter.WriteStartElement(XmlConstants.Property); 511xmlWriter.WriteAttributeString(XmlConstants.Name, resourceProperty.Name); 513xmlWriter.WriteAttributeString(XmlConstants.Type, elementName); 516xmlWriter.WriteAttributeString(XmlConstants.Nullable, XmlConstants.XmlFalseLiteral); 530xmlWriter.WriteStartElement(XmlConstants.NavigationProperty); 531xmlWriter.WriteAttributeString(XmlConstants.Name, resourceProperty.Name); 543xmlWriter.WriteAttributeString(XmlConstants.Relationship, associationType.FullName); 544xmlWriter.WriteAttributeString(XmlConstants.FromRole, thisEnd.Name); 545xmlWriter.WriteAttributeString(XmlConstants.ToRole, relatedEnd.Name); 567xmlWriter.WriteAttributeString(XmlConstants.Nullable, nullable ? XmlConstants.XmlTrueLiteral : XmlConstants.XmlFalseLiteral); 579xmlWriter.WriteStartElement(XmlConstants.Association); 580xmlWriter.WriteAttributeString(XmlConstants.Name, association.Name); 584xmlWriter.WriteStartElement(XmlConstants.End); 585xmlWriter.WriteAttributeString(XmlConstants.Role, endInfo.Name); 588xmlWriter.WriteAttributeString(XmlConstants.Type, endInfo.ResourceType.FullName); 591xmlWriter.WriteAttributeString(XmlConstants.Multiplicity, endInfo.Multiplicity); 611xmlWriter.WriteStartElement(XmlConstants.AssociationSet); 612xmlWriter.WriteAttributeString(XmlConstants.Name, associationSet.Name); 614xmlWriter.WriteAttributeString(XmlConstants.Association, associationSet.ResourceAssociationType.FullName); 634xmlWriter.WriteStartElement(XmlConstants.End); 635xmlWriter.WriteAttributeString(XmlConstants.Role, associationTypeEnd.Name); 636xmlWriter.WriteAttributeString(XmlConstants.EntitySet, associationSetEnd.ResourceSet.Name); 648return XmlConstants.EdmV1Namespace; 651return XmlConstants.EdmV1dot1Namespace; 654return XmlConstants.EdmV1dot2Namespace; 658return XmlConstants.EdmV2Namespace; 675xmlWriter.WriteStartElement(XmlConstants.EntityContainer); 676xmlWriter.WriteAttributeString(XmlConstants.Name, entityContainerName); 680MetadataSerializer.WriteDataWebMetadata(xmlWriter, XmlConstants.IsDefaultEntityContainerAttribute, XmlConstants.XmlTrueLiteral); 684xmlWriter.WriteStartElement(XmlConstants.EntitySet); 685xmlWriter.WriteAttributeString(XmlConstants.Name, container.Name); 686xmlWriter.WriteAttributeString(XmlConstants.EntityType, container.ResourceType.FullName);
System\Data\Services\Serializers\PlainXmlDeserializer.cs (8)
216if ((elementNamespace != XmlConstants.DataWebMetadataNamespace && elementNamespace != XmlConstants.DataWebNamespace) || 217localName != XmlConstants.UriElementName) 264string elementValue = reader.GetAttribute(XmlConstants.AtomNullAttributeName, XmlConstants.DataWebMetadataNamespace); 399if (elementNamespace != XmlConstants.DataWebNamespace) 469string typeName = reader.GetAttribute(XmlConstants.AtomTypeAttributeName, XmlConstants.DataWebMetadataNamespace);
System\Data\Services\Serializers\PlainXmlSerializer.cs (20)
85writer.WriteAttributeString(XmlConstants.AtomNullAttributeName, XmlConstants.DataWebMetadataNamespace, XmlConstants.XmlTrueLiteral); 99object.ReferenceEquals(propertyTypeName, XmlConstants.EdmStringTypeName) == (propertyTypeName == XmlConstants.EdmStringTypeName), 101writer.WriteStartElement(propertyName, XmlConstants.DataWebNamespace); 102if (!object.ReferenceEquals(propertyTypeName, XmlConstants.EdmStringTypeName)) 104writer.WriteAttributeString(XmlConstants.AtomTypeAttributeName, XmlConstants.DataWebMetadataNamespace, propertyTypeName); 176this.writer.WriteStartElement(this.RequestDescription.ContainerName, XmlConstants.DataWebNamespace); 187this.WriteValueWithName(element, XmlConstants.XmlCollectionItemElementName, resourceType); 200XmlConstants.DataWebMetadataNamespacePrefix, 201XmlConstants.RowCountElement, 202XmlConstants.DataWebMetadataNamespace); 216this.writer.WriteStartElement(XmlConstants.UriElementName, XmlConstants.DataWebNamespace); 228this.writer.WriteStartElement(XmlConstants.LinkCollectionElementName, XmlConstants.DataWebNamespace); 274this.writer.WriteStartElement(XmlConstants.NextElementName, XmlConstants.DataWebNamespace);
System\Data\Services\Serializers\Serializer.cs (10)
41XmlConstants.HttpQueryStringFilter, 42XmlConstants.HttpQueryStringExpand, 43XmlConstants.HttpQueryStringOrderBy, 44XmlConstants.HttpQueryStringInlineCount, 45XmlConstants.HttpQueryStringSelect 343return expanded.GetExpandedPropertyValue(XmlConstants.HttpQueryStringSkipToken) as IExpandedResult; 892queryParametersBuilder.Append(XmlConstants.HttpQueryStringTop).Append('=').Append(remainingResults); 1100String topQueryItem = this.service.OperationContext.Host.GetQueryStringItem(XmlConstants.HttpQueryStringTop); 1123this.skipToken.Append(XmlConstants.HttpQueryStringSkipToken).Append('='); 1192String keyName = XmlConstants.SkipTokenPropertyPrefix + i.ToString(System.Globalization.CultureInfo.InvariantCulture);
System\Data\Services\Serializers\SyndicationDeserializer.cs (28)
128SyndicationCategory category = item.Categories.Where(c => c.Scheme == XmlConstants.DataWebSchemeNamespace).FirstOrDefault(); 190if (mime != XmlConstants.MimeApplicationAtom) 192throw DataServiceException.CreateBadRequestError(Strings.BadRequest_MimeTypeMustBeApplicationAtom(mime, XmlConstants.MimeApplicationAtom)); 198typeParameterValue = HttpProcessUtility.GetParameterValue(contentTypeParameters, XmlConstants.AtomTypeAttributeName); 203if (typeParameterValue != XmlConstants.AtomEntryElementName) 205throw DataServiceException.CreateBadRequestError(Strings.BadRequest_InvalidTypeParameterSpecifiedInMimeType(typeParameterValue, XmlConstants.AtomEntryElementName)); 208else if (typeParameterValue != XmlConstants.AtomFeedElementName) 210throw DataServiceException.CreateBadRequestError(Strings.BadRequest_InvalidTypeParameterSpecifiedInMimeType(typeParameterValue, XmlConstants.AtomFeedElementName)); 225SyndicationElementExtension properties = item.ElementExtensions.Where(p => p.OuterName == XmlConstants.AtomPropertiesElementName && p.OuterNamespace == XmlConstants.DataWebMetadataNamespace).FirstOrDefault(); 246if (!WebUtil.CompareMimeType(contentType, XmlConstants.MimeApplicationXml)) 261reader.ReadStartElement(XmlConstants.AtomContentElementName, XmlConstants.AtomNamespace); 262if (!reader.IsStartElement(XmlConstants.AtomPropertiesElementName, XmlConstants.DataWebMetadataNamespace)) 333reader.ReadStartElement(XmlConstants.AtomPropertiesElementName, XmlConstants.DataWebMetadataNamespace); 591if (e.OuterNamespace != XmlConstants.DataWebMetadataNamespace || 592e.OuterName != XmlConstants.AtomInlineElementName) 612if (namespaceUri != XmlConstants.AtomNamespace) 617XmlConstants.AtomInlineElementName, 618XmlConstants.AtomFeedElementName, 619XmlConstants.AtomEntryElementName)); 632if (elementName == XmlConstants.AtomEntryElementName) 649else if (elementName == XmlConstants.AtomFeedElementName) 689XmlConstants.AtomInlineElementName, 690XmlConstants.AtomFeedElementName, 691XmlConstants.AtomEntryElementName));
System\Data\Services\Serializers\SyndicationSerializer.cs (30)
42internal static readonly XmlQualifiedName QualifiedNullAttribute = new XmlQualifiedName(XmlConstants.AtomNullAttributeName, XmlConstants.DataWebMetadataNamespace); 48private static readonly XmlQualifiedName QualifiedDataWebPrefix = new XmlQualifiedName(XmlConstants.DataWebNamespacePrefix, XmlConstants.XmlNamespacesNamespace); 51private static readonly XmlQualifiedName QualifiedDataWebMetadataPrefix = new XmlQualifiedName(XmlConstants.DataWebMetadataNamespacePrefix, XmlConstants.XmlNamespacesNamespace); 278XName.Get(XmlConstants.RowCountElement, XmlConstants.DataWebMetadataNamespace), 311attributeExtensions.Add(QualifiedDataWebPrefix, XmlConstants.DataWebNamespace); 312attributeExtensions.Add(QualifiedDataWebMetadataPrefix, XmlConstants.DataWebMetadataNamespace); 321item.Categories.Add(new SyndicationCategory(fullName, XmlConstants.DataWebSchemeNamespace, null)); 476target.AttributeExtensions[QualifiedNullAttribute] = XmlConstants.XmlTrueLiteral; 518target.AttributeExtensions[new XmlQualifiedName(XmlConstants.AtomETagAttributeName, XmlConstants.DataWebMetadataNamespace)] 583var link = new SyndicationLink(uri, XmlConstants.AtomSelfRelationAttributeValue, title, null, 0L); 615this.writer.WriteStartElement("link", XmlConstants.AtomNamespace); 716XmlQualifiedName mediaResourceETagKey = new XmlQualifiedName(XmlConstants.AtomETagAttributeName, XmlConstants.DataWebMetadataNamespace); 722XmlConstants.AtomEditMediaRelationAttributeValue, 731XmlConstants.AtomEditRelationAttributeValue, 1050string linkType = navProperty.IsOfKind(ResourcePropertyKind.ResourceReference) ? XmlConstants.AtomEntryElementName : XmlConstants.AtomFeedElementName; 1051linkType = String.Format(CultureInfo.InvariantCulture, "{0};{1}={2}", XmlConstants.MimeApplicationAtom, XmlConstants.AtomTypeAttributeName, linkType); 1057XmlConstants.DataWebRelatedNamespace + navProperty.Name, 1075link.RelationshipType = XmlConstants.DataWebRelatedNamespace + navProperty.Name; 1176[XmlRoot(ElementName = XmlConstants.AtomInlineElementName, Namespace = XmlConstants.DataWebMetadataNamespace)] 1230[XmlRoot(ElementName = XmlConstants.AtomInlineElementName, Namespace = XmlConstants.DataWebMetadataNamespace)]
System\Data\Services\UpdatableWrapper.cs (7)
190else if (host.RequestIfMatch != XmlConstants.HttpAnyETag) 334if (ifMatchHeaderValue == XmlConstants.HttpAnyETag) 340Debug.Assert(ifMatchHeaderValue.StartsWith(XmlConstants.HttpWeakETagPrefix, StringComparison.Ordinal), "If-Match header must be properly formatted - this check is done in DataService.CheckETagValues method"); 341Debug.Assert(ifMatchHeaderValue.Length >= XmlConstants.HttpWeakETagPrefix.Length + 1, "If-Match header must be properly formatted - this check is done in DataService.CheckETagValues method"); 344string strippedETag = ifMatchHeaderValue.Substring(XmlConstants.HttpWeakETagPrefix.Length, ifMatchHeaderValue.Length - XmlConstants.HttpWeakETagPrefix.Length - 1); 389if (value != XmlConstants.NullLiteralInETag)
System\Data\Services\WebUtil.cs (57)
69new KeyValuePair<Type, string>(typeof(string), XmlConstants.EdmStringTypeName), 70new KeyValuePair<Type, string>(typeof(Boolean), XmlConstants.EdmBooleanTypeName), 71new KeyValuePair<Type, string>(typeof(Boolean?), XmlConstants.EdmBooleanTypeName), 72new KeyValuePair<Type, string>(typeof(Byte), XmlConstants.EdmByteTypeName), 73new KeyValuePair<Type, string>(typeof(Byte?), XmlConstants.EdmByteTypeName), 74new KeyValuePair<Type, string>(typeof(DateTime), XmlConstants.EdmDateTimeTypeName), 75new KeyValuePair<Type, string>(typeof(DateTime?), XmlConstants.EdmDateTimeTypeName), 76new KeyValuePair<Type, string>(typeof(Decimal), XmlConstants.EdmDecimalTypeName), 77new KeyValuePair<Type, string>(typeof(Decimal?), XmlConstants.EdmDecimalTypeName), 78new KeyValuePair<Type, string>(typeof(Double), XmlConstants.EdmDoubleTypeName), 79new KeyValuePair<Type, string>(typeof(Double?), XmlConstants.EdmDoubleTypeName), 80new KeyValuePair<Type, string>(typeof(Guid), XmlConstants.EdmGuidTypeName), 81new KeyValuePair<Type, string>(typeof(Guid?), XmlConstants.EdmGuidTypeName), 82new KeyValuePair<Type, string>(typeof(Int16), XmlConstants.EdmInt16TypeName), 83new KeyValuePair<Type, string>(typeof(Int16?), XmlConstants.EdmInt16TypeName), 84new KeyValuePair<Type, string>(typeof(Int32), XmlConstants.EdmInt32TypeName), 85new KeyValuePair<Type, string>(typeof(Int32?), XmlConstants.EdmInt32TypeName), 86new KeyValuePair<Type, string>(typeof(Int64), XmlConstants.EdmInt64TypeName), 87new KeyValuePair<Type, string>(typeof(Int64?), XmlConstants.EdmInt64TypeName), 88new KeyValuePair<Type, string>(typeof(SByte), XmlConstants.EdmSByteTypeName), 89new KeyValuePair<Type, string>(typeof(SByte?), XmlConstants.EdmSByteTypeName), 90new KeyValuePair<Type, string>(typeof(Single), XmlConstants.EdmSingleTypeName), 91new KeyValuePair<Type, string>(typeof(Single?), XmlConstants.EdmSingleTypeName), 92new KeyValuePair<Type, string>(typeof(byte[]), XmlConstants.EdmBinaryTypeName), 95new KeyValuePair<Type, string>(typeof(XElement), XmlConstants.EdmStringTypeName), 96new KeyValuePair<Type, string>(typeof(Binary), XmlConstants.EdmBinaryTypeName), 103new KeyValuePair<Type, string>(typeof(byte[]), XmlConstants.MimeApplicationOctetStream), 104new KeyValuePair<Type, string>(typeof(Binary), XmlConstants.MimeApplicationOctetStream), 337contentType = XmlConstants.MimeTextPlain; 435if (WebUtil.CompareMimeType(contentType, XmlConstants.MimeApplicationJson)) 439else if (WebUtil.CompareMimeType(contentType, XmlConstants.MimeTextXml) || 440WebUtil.CompareMimeType(contentType, XmlConstants.MimeApplicationXml)) 444else if (WebUtil.CompareMimeType(contentType, XmlConstants.MimeApplicationAtom) || 445WebUtil.CompareMimeType(contentType, XmlConstants.MimeAny)) 460Strings.BadRequest_InvalidContentTypeForRequestUri(contentType, String.Format(CultureInfo.InvariantCulture, "'{0}', '{1}', '{2}'", XmlConstants.MimeApplicationJson, XmlConstants.MimeApplicationXml, XmlConstants.MimeTextXml))); 472Strings.BadRequest_InvalidContentTypeForRequestUri(contentType, String.Format(CultureInfo.InvariantCulture, "'{0}', '{1}', '{2}'", XmlConstants.MimeApplicationJson, XmlConstants.MimeApplicationAtom, XmlConstants.MimeAny))); 481Strings.BadRequest_InvalidContentTypeForRequestUri(contentType, String.Format(CultureInfo.InvariantCulture, "'{0}', '{1}', '{2}'", XmlConstants.MimeApplicationJson, XmlConstants.MimeApplicationXml, XmlConstants.MimeTextXml))); 816if (String.IsNullOrEmpty(etag) || etag == XmlConstants.HttpAnyETag) 826if (etag.StartsWith(XmlConstants.HttpWeakETagPrefix, StringComparison.Ordinal) && etag[etag.Length - 1] == '"') 904resultBuilder.Append(XmlConstants.HttpWeakETagPrefix); 937keyValueText = XmlConstants.NullLiteralInETag; 995Debug.Assert(fullName.StartsWith(XmlConstants.EdmNamespace, StringComparison.Ordinal), "fullName.StartsWith(XmlConstants.EdmNamespace, StringComparison.Ordinal)"); 996string name = fullName.Substring(XmlConstants.EdmNamespace.Length + 1); 997types[i] = new ResourceType(PrimitiveTypesEdmNameMapping[i].Key, XmlConstants.EdmNamespace, name); 1084else if (host.RequestIfMatch == XmlConstants.HttpAnyETag) 1088else if (host.RequestIfNoneMatch == XmlConstants.HttpAnyETag) 1609string mime = HttpProcessUtility.SelectMimeType(mimeTypeText, new string[] { XmlConstants.MimeApplicationAtom }); 1610return WebUtil.CompareMimeType(mime, XmlConstants.MimeApplicationAtom); 1672XmlConstants.XmlNamespacePrefix, // prefix 1673XmlConstants.XmlSpaceAttributeName, // localName 1675XmlConstants.XmlSpacePreserveValue); // value