215 references to Util
System.Data.Services.Client (215)
parent\Server\System\Data\Services\Epm\EpmCustomContentWriterNodeData.cs (1)
149
Util
.CheckArgumentNull(target, "target");
System\Data\Services\Client\ALinq\DataServiceQueryProvider.cs (5)
48
Util
.CheckArgumentNull(expression, "expression");
59
return (IQueryable)
Util
.ConstructorInvoke(ci, args);
68
Util
.CheckArgumentNull(expression, "expression");
79
Util
.CheckArgumentNull(expression, "expression");
91
Util
.CheckArgumentNull(expression, "expression");
System\Data\Services\Client\ALinq\UriWriter.cs (3)
52
this.uriVersion =
Util
.DataServiceVersion1;
68
uri =
Util
.CreateUri(context.BaseUriWithSlash,
Util
.CreateUri(writer.uriBuilder.ToString(), UriKind.Relative));
System\Data\Services\Client\AtomMaterializer.cs (6)
557
IEnumerable list = (IEnumerable)
Util
.ActivatorCreateInstance(typeof(List<>).MakeGenericType(resultType));
773
IEnumerable list = (IEnumerable)
Util
.ActivatorCreateInstance(feedType);
779
list = (IEnumerable)
Util
.ActivatorCreateInstance(
810
object complexInstance =
Util
.ActivatorCreateInstance(property.PropertyType);
1038
Util
.SetNextLinkForCollection(to, continuation);
1868
Util
.SetNextLinkForCollection(collection, continuation);
System\Data\Services\Client\AtomParser.cs (12)
347
if (
Util
.AreSame(XmlConstants.AtomNamespace, namespaceURI))
349
if (
Util
.AreSame(XmlConstants.AtomEntryElementName, elementName))
353
else if (
Util
.AreSame(XmlConstants.AtomFeedElementName, elementName))
357
else if (
Util
.AreSame(XmlConstants.AtomLinkElementName, elementName) &&
358
Util
.AreSame(XmlConstants.AtomLinkNextAttributeString, reader.GetAttribute(XmlConstants.AtomLinkRelationAttributeName)))
363
else if (
Util
.AreSame(XmlConstants.DataWebMetadataNamespace, namespaceURI))
365
if (
Util
.AreSame(XmlConstants.RowCountElement, elementName))
812
result.IsNull =
Util
.DoesNullAttributeSayTrue(this.reader);
923
idText =
Util
.ReferenceIdentity(idText);
928
Uri idUri =
Util
.CreateUri(idText, UriKind.RelativeOrAbsolute);
1042
Uri uri =
Util
.CreateUri(href, UriKind.RelativeOrAbsolute);
1045
Uri baseUri =
Util
.CreateUri(this.reader.BaseURI, UriKind.RelativeOrAbsolute);
System\Data\Services\Client\BaseAsyncResult.cs (5)
209
Util
.CheckArgumentNull(asyncResult, "asyncResult");
239
Util
.Dispose(result.asyncWait);
250
if (
Util
.IsKnownClientExcption(result.Failure))
339
if (!
Util
.DoNotHandleException(this.Failure))
387
return
Util
.DoNotHandleException(e);
System\Data\Services\Client\Binding\BindingObserver.cs (4)
165
Util
.CheckArgumentNull(source, "source");
166
Util
.CheckArgumentNull(eventArgs, "eventArgs");
277
Util
.CheckArgumentNull(collection, "collection");
278
Util
.CheckArgumentNull(eventArgs, "eventArgs");
System\Data\Services\Client\Binding\DataServiceCollectionOfT.cs (1)
553
Util
.CheckArgumentNull(items, "items");
System\Data\Services\Client\ClientConvert.cs (3)
184
return
Util
.CreateUri(propertyValue, UriKind.RelativeOrAbsolute);
394
return
Util
.ContainsReference(namedTypesMap.Values.ToArray(), type);
521
int index =
Util
.IndexOfReference(ClientConvert.knownTypes, type);
System\Data\Services\Client\DataServiceContext.cs (117)
141
Util
.CheckArgumentNull(serviceRoot, "serviceRoot");
176
this.baseUriWithSlash =
Util
.CreateUri(serviceRootString + "/", UriKind.Absolute);
270
set { this.mergeOption =
Util
.CheckEnumerationValue(value, "MergeOption"); }
304
Util
.CheckArgumentNull(value, "value");
383
Util
.CheckArgumentNull(value, "value");
480
Util
.CheckArgumentNull(entity, "entity");
502
Util
.CheckArgumentNull(source, "source");
503
Util
.CheckArgumentNotEmpty(sourceProperty, "sourceProperty");
504
Util
.CheckArgumentNull(target, "target");
526
Util
.CheckArgumentNull(asyncResult, "asyncResult");
581
Util
.CheckArgumentNotEmpty(entitySetName, "entitySetName");
598
Uri metadataUri =
Util
.CreateUri(this.baseUriWithSlash.OriginalString + XmlConstants.UriMetadataSegment, UriKind.Absolute);
646
Util
.CheckArgumentNull(continuation, "continuation");
842
Util
.CheckArgumentNotEmpty(acceptContentType, "acceptContentType");
889
Util
.CheckArgumentNull(contentType, "contentType");
890
Util
.CheckArgumentNull(slug, "slug");
917
Util
.CheckArgumentNull(stream, "stream");
918
Util
.CheckArgumentNull(args, "args");
966
Util
.CheckArgumentNotEmpty(queries, "queries");
992
Util
.CheckArgumentNotEmpty(queries, "queries");
1013
requestUri =
Util
.CreateUri(this.baseUriWithSlash, requestUri);
1014
QueryComponents qc = new QueryComponents(requestUri,
Util
.DataServiceVersionEmpty, typeof(TElement), null, null);
1028
Util
.CheckArgumentNull(continuation, "continuation");
1045
Util
.CheckArgumentNull(asyncResult, "asyncResult");
1063
requestUri =
Util
.CreateUri(this.baseUriWithSlash, requestUri);
1064
QueryComponents qc = new QueryComponents(requestUri,
Util
.DataServiceVersionEmpty, typeof(TElement), null, null);
1076
Util
.CheckArgumentNull(continuation, "continuation");
1263
Util
.CheckArgumentNull(source, "source");
1264
Util
.CheckArgumentNotEmpty(sourceProperty, "sourceProperty");
1412
Util
.CheckArgumentNull(source, "source");
1413
Util
.CheckArgumentNotEmpty(sourceProperty, "propertyName");
1414
Util
.CheckArgumentNull(target, "target");
1502
String identity =
Util
.ReferenceIdentity(editLink.AbsoluteUri);
1520
Util
.CheckArgumentNull(entity, "entity");
1554
Util
.CheckArgumentNull(entity, "entity");
1573
Util
.CheckArgumentNull(entity, "entity");
1601
Util
.CheckArgumentNull(identity, "relativeUri");
1606
entity = (TEntity)this.TryGetEntity(
Util
.ReferenceIdentity(CommonUtil.UriToString(identity)), null, MergeOption.AppendOnly, out state);
1622
Util
.CheckArgumentNull(entity, "entity");
1632
string identityUri =
Util
.DereferenceIdentity(resource.Identity);
1633
identity =
Util
.CreateUri(identityUri, UriKind.Absolute);
1749
String identity =
Util
.ReferenceIdentity(CommonUtil.UriToString(editLink));
1992
request.Headers[XmlConstants.HttpDataServiceVersion] = requestVersion.ToString() +
Util
.VersionSuffix;
1995
request.Headers[XmlConstants.HttpMaxDataServiceVersion] =
Util
.MaxResponseVersion.ToString() +
Util
.VersionSuffix;
2217
if (codegenAttr == null || codegenAttr.Tool !=
Util
.CodeGeneratorToolName)
2273
if (!
Util
.SupportedResponseVersions.Contains(version.Key))
2289
Debug.Assert(
Util
.SupportedResponseVersions.Length > 0, "At least one supported version must exist.");
2291
StringBuilder supportedVersions = new StringBuilder("'").Append(
Util
.SupportedResponseVersions[0].ToString());
2292
for (int versionIdx = 1; versionIdx <
Util
.SupportedResponseVersions.Length; versionIdx++)
2295
supportedVersions.Append(
Util
.SupportedResponseVersions[versionIdx].ToString());
2356
return
Util
.CreateUri(builder.ToString(), UriKind.Absolute);
2521
Util
.CheckArgumentNull(entity, "entity");
2535
Util
.CheckArgumentNull(entity, "entity");
2592
if (requestVersion !=
Util
.DataServiceVersion1 && requestVersion !=
Util
.DataServiceVersionEmpty)
2594
writer.WriteLine("{0}: {1}{2}", XmlConstants.HttpDataServiceVersion, requestVersion,
Util
.VersionSuffix);
2682
return this.CreateRequest(this.CreateRequestUri(sourceResource, binding), GetLinkHttpMethod(binding), false, XmlConstants.MimeApplicationXml,
Util
.DataServiceVersion1, false);
2691
Uri requestUri =
Util
.CreateUri(sourceResource.GetResourceUri(this.baseUriWithSlash, false /*queryLink*/), this.CreateRequestRelativeUri(binding));
2718
relative =
Util
.CreateUri(XmlConstants.UriLinkSegment + "/" + CommonUtil.UriToString(navigationPropertyUri), UriKind.Relative);
2722
relative =
Util
.CreateUri(XmlConstants.UriLinkSegment + "/" + binding.SourceProperty, UriKind.Relative);
2748
WriteOperationRequestHeaders(text, GetLinkHttpMethod(binding), requestString,
Util
.DataServiceVersion1);
2827
Version requestVersion = ClientType.Create(box.Entity.GetType()).EpmIsV1Compatible ?
Util
.DataServiceVersion1 :
Util
.DataServiceVersion2;
2854
Version requestVersion = ClientType.Create(box.Entity.GetType()).EpmIsV1Compatible ?
Util
.DataServiceVersion1 :
Util
.DataServiceVersion2;
2949
writer.WriteElementString(XmlConstants.AtomIdElementName,
Util
.DereferenceIdentity(box.Identity));
3107
String identity =
Util
.ReferenceIdentity(CommonUtil.UriToString(editLink));
3235
Util
.CheckArgumentNotEmpty(propertyName, "propertyName");
3267
relativeUri =
Util
.CreateUri(XmlConstants.UriValueSegment, UriKind.Relative);
3271
relativeUri =
Util
.CreateUri(propertyName + (null != property.CollectionType ? "()" : String.Empty), UriKind.Relative);
3274
requestUri =
Util
.CreateUri(box.GetResourceUri(this.baseUriWithSlash, true /*queryLink*/), relativeUri);
3275
requestVersion =
Util
.DataServiceVersion1;
3280
requestVersion =
Util
.DataServiceVersionEmpty;
3445
Util
.CheckArgumentNull(resource, parameterName);
3481
Util
.CheckArgumentNotEmpty(sourceProperty, "sourceProperty");
3553
Util
.CheckArgumentNotEmpty(entitySetName, "entitySetName");
3554
entitySetName = entitySetName.Trim(
Util
.ForwardSlash);
3556
Util
.CheckArgumentNotEmpty(entitySetName, "entitySetName");
3558
Uri tmp =
Util
.CreateUri(entitySetName, UriKind.RelativeOrAbsolute);
3560
!String.IsNullOrEmpty(
Util
.CreateUri(this.baseUriWithSlash, tmp)
3606
Util
.CheckArgumentNull(args, "args");
3923
Util
.SetNextLinkForCollection(collection, continuation);
4763
Util
.DataServiceVersion1,
5050
Uri requestUri =
Util
.CreateUri(this.Context.baseUriWithSlash,
Util
.CreateUri("$batch", UriKind.Relative));
5052
HttpWebRequest httpWebRequest = this.Context.CreateRequest(requestUri, XmlConstants.HttpMethodPost, false, contentType,
Util
.DataServiceVersion1, false);
5088
Uri requestUri =
Util
.CreateUri(this.Context.baseUriWithSlash, this.Queries[i].QueryComponents.Uri);
5549
editLink =
Util
.CreateUri(location, UriKind.Absolute);
5566
QueryComponents qc = new QueryComponents(null,
Util
.DataServiceVersionEmpty, entityDescriptor.Entity.GetType(), null, null);
5716
HttpWebRequest httpWebRequest =
Util
.NullCheck(pereq.Request, InternalError.InvalidEndGetRequestStreamRequest);
5718
Stream stream =
Util
.NullCheck(httpWebRequest.EndGetRequestStream(asyncResult), InternalError.InvalidEndGetRequestStreamStream);
5722
Util
.NullCheck(contentStream, InternalError.InvalidEndGetRequestStreamContent);
5723
Util
.NullCheck(contentStream.Stream, InternalError.InvalidEndGetRequestStreamContent);
5753
Util
.DebugInjectFault("SaveAsyncResult::AsyncEndGetRequestStream_BeforeBeginRead");
5786
Util
.NullCheck(contentStream, InternalError.InvalidEndReadStream);
5787
Util
.NullCheck(contentStream.Stream, InternalError.InvalidEndReadStream);
5788
Stream stream =
Util
.NullCheck(pereq.RequestStream, InternalError.InvalidEndReadStream);
5790
Util
.DebugInjectFault("SaveAsyncResult::AsyncRequestContentEndRead_BeforeEndRead");
5804
Util
.DebugInjectFault("SaveAsyncResult::AsyncRequestContentEndRead_BeforeBeginWrite");
5813
Util
.DebugInjectFault("SaveAsyncResult::AsyncRequestContentEndRead_BeforeBeginRead");
5834
HttpWebRequest httpWebRequest =
Util
.NullCheck(pereq.Request, InternalError.InvalidEndWriteRequest);
5867
Util
.NullCheck(contentStream, InternalError.InvalidEndWriteStream);
5868
Util
.NullCheck(contentStream.Stream, InternalError.InvalidEndWriteStream);
5869
Stream stream =
Util
.NullCheck(pereq.RequestStream, InternalError.InvalidEndWriteStream);
5870
Util
.DebugInjectFault("SaveAsyncResult::AsyncEndWrite_BeforeEndWrite");
5881
Util
.DebugInjectFault("SaveAsyncResult::AsyncEndWrite_BeforeBeginRead");
5912
HttpWebRequest httpWebRequest =
Util
.NullCheck(pereq.Request, InternalError.InvalidEndGetResponseRequest);
5918
Util
.DebugInjectFault("SaveAsyncResult::AsyncEndGetResponse::BeforeEndGetResponse");
5930
pereq.HttpWebResponse =
Util
.NullCheck(response, InternalError.InvalidEndGetResponseResponse);
5938
Util
.DebugInjectFault("SaveAsyncResult::AsyncEndGetResponse_BeforeGetStream");
5955
Util
.DebugInjectFault("SaveAsyncResult::AsyncEndGetResponse_BeforeBeginRead");
5999
Stream stream =
Util
.NullCheck(pereq.ResponseStream, InternalError.InvalidEndReadStream);
6001
Util
.DebugInjectFault("SaveAsyncResult::AsyncEndRead_BeforeEndRead");
6005
Stream outputResponse =
Util
.NullCheck(this.httpWebResponseStream, InternalError.InvalidEndReadCopy);
6241
Util
.DebugInjectFault("PerRequest::Dispose_BeforeRequestStreamDisposed");
6256
Util
.DebugInjectFault("PerRequest::Dispose_WebExceptionThrown");
System\Data\Services\Client\DataServiceKeyAttribute.cs (3)
35
Util
.CheckArgumentNull(keyName, "keyName");
36
Util
.CheckArgumentNotEmpty(keyName, "KeyName");
48
Util
.CheckArgumentNull(keyNames, "keyNames");
System\Data\Services\Client\DataServiceQueryContinuation.cs (2)
98
object result =
Util
.ConstructorInvoke(constructors[0], new object[] { nextLinkUri, plan });
109
QueryComponents result = new QueryComponents(this.NextLinkUri,
Util
.DataServiceVersionEmpty, this.Plan.LastSegmentType, null, null);
System\Data\Services\Client\DataServiceQueryOfT.cs (4)
155
Util
.CheckArgumentNull(path, "path");
156
Util
.CheckArgumentNotEmpty(path, "path");
188
Util
.CheckArgumentNull(name, "name");
189
Util
.CheckArgumentNull(value, "value");
System\Data\Services\Client\DataServiceRequest.cs (1)
197
this.QueryComponents.Version =
Util
.DataServiceVersion2;
System\Data\Services\Client\DataServiceRequestOfT.cs (2)
41
Util
.CheckArgumentNull(requestUri, "requestUri");
44
this.queryComponents = new QueryComponents(requestUri,
Util
.DataServiceVersionEmpty, elementType, null, null);
System\Data\Services\Client\DataServiceStreamResponse.cs (1)
114
Util
.Dispose(ref this.response);
System\Data\Services\Client\EntityDescriptor.cs (11)
155
Util
.CheckArgumentNotEmpty(value, "Identity");
385
return
Util
.CreateUri(
386
Util
.CreateUri(baseUriWithSlash, new Uri("$" + this.parentDescriptor.ChangeOrder.ToString(CultureInfo.InvariantCulture), UriKind.Relative)),
387
Util
.CreateUri(this.parentProperty, UriKind.Relative));
391
return
Util
.CreateUri(
Util
.CreateUri(baseUriWithSlash, this.parentDescriptor.GetLink(queryLink)), this.GetLink(queryLink));
396
return
Util
.CreateUri(baseUriWithSlash, this.GetLink(queryLink));
440
return this.ReadStreamUri == null ? null :
Util
.CreateUri(serviceBaseUri, this.ReadStreamUri);
450
return this.EditStreamUri == null ? null :
Util
.CreateUri(serviceBaseUri, this.EditStreamUri);
479
return
Util
.CreateUri(this.entitySetName, UriKind.Relative);
483
return
Util
.CreateUri(this.parentProperty, UriKind.Relative);
System\Data\Services\Client\GetReadStreamResult.cs (1)
176
HttpWebRequest request =
Util
.NullCheck(state.request, InternalError.InvalidEndGetResponseRequest);
System\Data\Services\Client\MaterializeFromAtom.cs (6)
155
: this(context, reader, new QueryComponents(null,
Util
.DataServiceVersionEmpty, type, null, null), null, mergeOption)
497
(
Util
.AreSame(XmlConstants.AtomNamespace, this.reader.NamespaceURI) &&
498
Util
.AreSame(XmlConstants.AtomFeedElementName, this.reader.LocalName)) ||
499
(
Util
.AreSame(XmlConstants.DataWebNamespace, this.reader.NamespaceURI) &&
500
Util
.AreSame(XmlConstants.LinkCollectionElementName, this.reader.LocalName)),
562
bool empty = checkNullAttribute && !
Util
.DoesNullAttributeSayTrue(reader);
System\Data\Services\Client\MediaEntryAttribute.cs (1)
33
Util
.CheckArgumentNull(mediaMemberName, "mediaMemberName");
System\Data\Services\Client\QueryResult.cs (11)
231
this.SetHttpWebResponse(
Util
.NullCheck(response, InternalError.InvalidGetResponse));
357
Util
.Dispose(ref this.asyncResponseStream);
358
Util
.Dispose(ref this.requestStream);
359
Util
.Dispose(ref this.requestStreamContent);
550
HttpWebRequest httpWebRequest =
Util
.NullCheck(state.Request, InternalError.InvalidEndGetResponseRequest);
567
state.SetHttpWebResponse(
Util
.NullCheck(response, InternalError.InvalidEndGetResponseResponse));
581
state.responseStream =
Util
.NullCheck(state.GetAsyncResponseStreamCopy(), InternalError.InvalidAsyncResponseStreamCopy);
586
state.asyncStreamCopyBuffer =
Util
.NullCheck(state.GetAsyncResponseStreamCopyBuffer(), InternalError.InvalidAsyncResponseStreamCopyBuffer);
658
Stream stream =
Util
.NullCheck(state.asyncResponseStream, InternalError.InvalidEndReadStream);
659
Stream outputResponse =
Util
.NullCheck(state.responseStream, InternalError.InvalidEndReadCopy);
660
byte[] buffer =
Util
.NullCheck(state.asyncStreamCopyBuffer, InternalError.InvalidEndReadBuffer);
System\Data\Services\Client\SendingRequestEventArgs.cs (1)
60
Util
.CheckArgumentNull(value, "value");
System\Data\Services\Client\Util.cs (9)
244
char[] whitespace =
Util
.whitespaceForTracing;
255
System.Threading.Interlocked.CompareExchange(ref
Util
.whitespaceForTracing, tmp, whitespace);
279
Util
.CheckArgumentNull(requestUri, "requestUri");
288
requestUri = new Uri(baseUri,
Util
.CreateUri(requestUri.OriginalString.TrimStart(
Util
.ForwardSlash), UriKind.Relative));
297
requestUri =
Util
.CreateUri(baseUri.OriginalString + "/" + requestUri.OriginalString.TrimStart(
Util
.ForwardSlash), UriKind.Absolute);
567
writer.Write(
Util
.GetWhitespaceForTracing(2 + reader.Depth), 0, 2 + reader.Depth);
598
writer.Write(
Util
.GetWhitespaceForTracing(2 + reader.Depth), 0, 2 + reader.Depth);
System\Data\Services\Client\Xml\XmlAtomErrorReader.cs (3)
42
Util
.AreSame(this.Reader, XmlConstants.XmlErrorElementName, XmlConstants.DataWebMetadataNamespace))
67
bool empty = checkNullAttribute && !
Util
.DoesNullAttributeSayTrue(reader);
123
Util
.AreSame(reader, XmlConstants.XmlErrorMessageElementName, XmlConstants.DataWebMetadataNamespace))
System\Data\Services\Client\Xml\XmlWrappingReader.cs (2)
468
newBaseUri =
Util
.CreateUri(baseAttribute, UriKind.RelativeOrAbsolute);
482
newBaseUri =
Util
.CreateUri(this.xmlBaseStack.Peek().BaseUri, newBaseUri);