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