321 references to WebUtil
System.Data.Services (321)
System\Data\Services\BatchServiceHost.cs (2)
331WebUtil.CheckArgumentNull(args, "args"); 332Debug.Assert(WebUtil.IsCatchableExceptionType(args.Exception), "WebUtil.IsCatchableExceptionType(args.Exception)");
System\Data\Services\DataService.cs (47)
232if (!WebUtil.IsCatchableExceptionType(handlingException)) 353WebUtil.CheckArgumentNull(host, "host"); 362WebUtil.CheckArgumentNull(messageBody, "messageBody"); 458cachedConstructor = (Func<T>)WebUtil.CreateNewInstanceConstructor(dataContextType, null, dataContextType); 468WebUtil.CheckArgumentNull(args, "arg"); 521if (!WebUtil.IsETagValueValid(host.RequestIfMatch, allowStrongEtag)) 526if (!WebUtil.IsETagValueValid(host.RequestIfNoneMatch, allowStrongEtag)) 711WebUtil.CheckVersion(dataService, description); 869etag = WebUtil.GetETagValue(dataService, actualEntity, container); 875WebUtil.WriteETagValueInResponseHeader(etag, host); 877return WebUtil.GetEmptyStreamWriter(); 900IEnumerator queryResults = WebUtil.GetRequestEnumerator(description.RequestEnumerable); 926WebUtil.Dispose(queryResults); 994ContentFormat responseFormat = WebUtil.GetResponseFormatForPrimitiveValue(targetResourceType, out contentType); 1057if (!description.LinkUri && dataService.Provider.HasDerivedTypes(targetResourceType) && WebUtil.HasMediaLinkEntryInHierarchy(targetResourceType, dataService.Provider)) 1362etagValue = WebUtil.CompareAndGetETag(resource, resource, container, dataService, out writeResponse); 1369WebUtil.Dispose(queryResults); 1375return WebUtil.GetEmptyStreamWriter(); 1384WebUtil.Dispose(queryResults); 1389WebUtil.WriteETagValueInResponseHeader(etagValue, host); 1392return WebUtil.GetEmptyStreamWriter(); 1401string etagValue = WebUtil.GetETagValue(dataService, actualEntity, container); 1408WebUtil.Dispose(queryResults); 1425WebUtil.CheckResourceExists(element != null, description.LastSegmentInfo.Identifier); 1426ResourceType resourceType = WebUtil.GetResourceType(dataService.Provider, element); 1519WebUtil.CheckResourceExists(resource != null, parentSegment.Identifier); 1530ResourceType openTypeParentResourceType = WebUtil.GetResourceType(dataService.Provider, resource); 1535resource = WebUtil.GetPropertyValue(dataService.Provider, resource, openTypeParentResourceType, resProperty, null); 1540resource = WebUtil.GetPropertyValue(dataService.Provider, resource, openTypeParentResourceType, null, currentSegment.Identifier); 1545resource = WebUtil.GetPropertyValue(dataService.Provider, resource, parentSegment.TargetResourceType, currentSegment.ProjectedProperty, null); 1568WebUtil.WriteETagValueInResponseHeader(etagValue, host); 1583WebUtil.Dispose(queryResults); 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), 1705if (!WebUtil.IsCatchableExceptionType(ex)) 1751if (!WebUtil.IsCatchableExceptionType(exception)) 1808return (description == null) ? WebUtil.GetEmptyStreamWriter() : SerializeResponseBody(description, this); 1826WebUtil.CheckVersion(this, null); 1904IDataServiceMetadataProvider metadataProviderInstance = WebUtil.GetService<IDataServiceMetadataProvider>(this); 1909queryProviderInstance = WebUtil.GetService<IDataServiceQueryProvider>(this); 2376if (!WebUtil.IsCatchableExceptionType(exception)) 2539if (!WebUtil.IsCatchableExceptionType(exception)) 2661Debug.Assert(WebUtil.IsCatchableExceptionType(exception), "WebUtil.IsCatchableExceptionType(exception)"); 2857WebUtil.Dispose(this.query);
System\Data\Services\DataServiceConfiguration.cs (6)
310WebUtil.CheckResourceContainerRights(rights, "rights"); 341WebUtil.CheckServiceOperationRights(rights, "rights"); 375WebUtil.CheckArgumentNull(name, "name"); 440WebUtil.CheckStringArgumentNull(typeName, "typeName"); 489predicate = (Expression)methods[i].Invoke(service.Instance, WebUtil.EmptyObjectArray); 544predicate = (Expression)methods[i].Invoke(service.Instance, WebUtil.EmptyObjectArray);
System\Data\Services\Epm\EpmCustomContentDeSerializer.cs (2)
78WebUtil.SkipToEnd(reader, elementName, namespaceUri); 160String attribValue = WebUtil.GetAttributeEx(reader, attributeSegment.SegmentName.Substring(1), attributeSegment.SegmentNamespaceUri);
System\Data\Services\Epm\EpmCustomContentWriterNodeData.cs (1)
151WebUtil.CheckArgumentNull(target, "target");
System\Data\Services\ErrorHandler.cs (6)
71Debug.Assert(WebUtil.IsCatchableExceptionType(exception), "WebUtil.IsCatchableExceptionType(exception)"); 103Debug.Assert(WebUtil.IsCatchableExceptionType(exception), "WebUtil.IsCatchableExceptionType(exception) - "); 128Debug.Assert(WebUtil.IsCatchableExceptionType(exception), "WebUtil.IsCatchableExceptionType(exception)"); 164Debug.Assert(WebUtil.IsCatchableExceptionType(exception), "WebUtil.IsCatchableExceptionType(exception)"); 238return WebUtil.GetEmptyStreamWriter(); 254if (WebUtil.CompareMimeType(args.ResponseContentType, XmlConstants.MimeApplicationJson))
System\Data\Services\ETagAttribute.cs (2)
38WebUtil.CheckArgumentNull(propertyName, "propertyName"); 49WebUtil.CheckArgumentNull(propertyNames, "propertyNames");
System\Data\Services\ExpandSegment.cs (2)
93WebUtil.CheckArgumentNull(name, "name"); 171WebUtil.CheckArgumentNull(path, "path");
System\Data\Services\HandleExceptionArgs.cs (1)
45this.exception = WebUtil.CheckArgumentNull(exception, "exception");
System\Data\Services\HttpContextServiceHost.cs (3)
212this.absoluteRequestUri = WebUtil.ApplyHostHeader(match.RequestUri, this.HostHeader); 318this.absoluteServiceUri = WebUtil.ApplyHostHeader(match.BaseUri, this.HostHeader); 331this.absoluteServiceUri = WebUtil.EnsureLastSegmentEmpty(this.absoluteServiceUri);
System\Data\Services\HttpProcessUtility.cs (3)
185if (WebUtil.CompareMimeType(acceptType.MimeType, exactContentType[i])) 1052if (WebUtil.CompareMimeType(this.type, candidateType)) 1061if (WebUtil.CompareMimeType(this.subType, candidateSubType))
System\Data\Services\IgnorePropertiesAttribute.cs (3)
40WebUtil.CheckArgumentNull(propertyName, "propertyName"); 51WebUtil.CheckArgumentNull(propertyNames, "propertyNames"); 102return WebUtil.EmptyStringArray;
System\Data\Services\Internal\ExpandedWrapper.cs (2)
48this.description = WebUtil.CheckArgumentNull(value, "value"); 49this.propertyNames = WebUtil.StringToSimpleArray(this.description);
System\Data\Services\Internal\ProjectedWrapper.cs (5)
97this.propertyNameList = WebUtil.CheckArgumentNull(value, "value"); 98this.propertyNames = WebUtil.StringToSimpleArray(this.propertyNameList); 111WebUtil.CheckArgumentNull(propertyName, "propertyName"); 210if (WebUtil.IsElementIEnumerable(resource, out enumerable)) 498WebUtil.Dispose(this.enumerator);
System\Data\Services\KeyInstance.cs (2)
237WebUtil.CreateIfNull(ref namedValues); 255WebUtil.CreateIfNull(ref positionalValues);
System\Data\Services\Parsing\FunctionDescription.cs (3)
281System.Data.Services.Providers.ResourceType[] primitiveTypes = WebUtil.GetPrimitiveTypes(); 397if (WebUtil.IsNullConstant(arguments[0])) 399targetType = WebUtil.GetTypeAllowingNull(targetType);
System\Data\Services\Parsing\RequestQueryParser.cs (38)
262throw ParseError(Strings.RequestQueryParser_ExpressionTypeMismatch(WebUtil.GetTypeName(typeof(bool)), exprPos)); 279foreach (var v in WebUtil.Zip(topLevelOrderingInfo.OrderingExpressions, k.PositionalValues, (x, y) => new { Order = x, Value = y })) 363else if (WebUtil.IsNullConstant(expr)) 847bool sourceNullable = WebUtil.IsNullableType(source); 848bool typeNullableA = WebUtil.IsNullableType(targetA); 849bool typeNullableB = WebUtil.IsNullableType(targetB); 1223return expression != WebUtil.NullLiteral && expression.Type == typeof(object) && IsOpenExpression(expression); 1338WebUtil.GetTypeName(left.Type), 1339WebUtil.GetTypeName(right.Type), 1353return WebUtil.NullLiteral; 1454if (WebUtil.TypeAllowsNull(left.Type)) 1456if (!WebUtil.TypeAllowsNull(right.Type)) 1461else if (WebUtil.TypeAllowsNull(right.Type)) 1477if (left == WebUtil.NullLiteral) 1481else if (right == WebUtil.NullLiteral) 1496if (right == WebUtil.NullLiteral) 1500else if (left == WebUtil.NullLiteral) 1535if (WebUtil.IsNullConstant(left)) 1539else if (WebUtil.IsNullConstant(right)) 1557else if (left == WebUtil.NullLiteral || right == WebUtil.NullLiteral) 1567if (!WebUtil.TypeAllowsNull(left.Type)) 1571else if (!WebUtil.TypeAllowsNull(right.Type)) 1938if (!WebUtil.TypeAllowsNull(castTargetType)) 1984WebUtil.TryResolveResourceType(this.provider, (string)((ConstantExpression)candidateTypeArgument).Value), 2045throw ParseError(Strings.RequestQueryParser_UnknownProperty(id, WebUtil.GetTypeName(type), errorPos)); 2118throw ParseError(Strings.RequestQueryParser_UnknownProperty(id, WebUtil.GetTypeName(type), errorPos)); 2272if (!this.nullPropagationRequired || element == this.it || !WebUtil.TypeAllowsNull(element.Type)) 2279if (element is ConstantExpression && element != WebUtil.NullLiteral) 2288if (!WebUtil.TypeAllowsNull(falseIf.Type)) 2310throw ParseError(Strings.RequestQueryParser_IncompatibleOperand(operationName, WebUtil.GetTypeName(args[0].Type), errorPos)); 2420WebUtil.TypeAllowsNull(applicable[0].Parameters[0].ParameterType) ? 2478if (ce == WebUtil.NullLiteral) 2480if (WebUtil.TypeAllowsNull(type)) 2496ResourceType resourceType = WebUtil.TryResolveResourceType(this.provider, text); 2553if (WebUtil.IsNullableType(expr.Type) && type.IsValueType) 2586WebUtil.RecurseEnterQueryParser(RecursionLimit, ref this.recursionDepth); 2592WebUtil.RecurseLeave(ref this.recursionDepth);
System\Data\Services\Providers\BaseServiceProvider.cs (8)
33protected const BindingFlags ResourceContainerBindingFlags = WebUtil.PublicInstanceBindingFlags; 56WebUtil.CheckArgumentNull(metadata, "metadata"); 57WebUtil.CheckArgumentNull(dataServiceInstance, "dataServiceInstance"); 79WebUtil.CheckArgumentNull(value, "value"); 251return type == typeof(object) || WebUtil.IsPrimitiveType(type); 505foreach (MethodInfo methodInfo in type.GetMethods(WebUtil.PublicInstanceBindingFlags | BindingFlags.FlattenHierarchy)) 611WebUtil.Dispose(this.instance); 741if (WebUtil.IsPrimitiveType(method.ReturnType))
System\Data\Services\Providers\BasicExpandProvider.cs (12)
173if (!WebUtil.IsExpandedWrapperType(query.ElementType)) 222WebUtil.IsExpandedWrapperType(elementType), 449WebUtil.CheckArgumentNull(enumerator, "enumerator"); 1283if (!WebUtil.TypeAllowsNull(expression.Type)) 1285expression = Expression.Convert(expression, WebUtil.GetTypeAllowingNull(expression.Type)); 1472WebUtil.TypeAllowsNull(propertyAccess.Type), 1593if (!WebUtil.TypeAllowsNull(propertyAccess.Type)) 1595propertyAccess = Expression.Convert(propertyAccess, WebUtil.GetTypeAllowingNull(resourceProperty.Type)); 1620propertyAccess = Expression.Constant(null, WebUtil.GetTypeAllowingNull(projectedProperty.Property.Type)); 1715Debug.Assert(WebUtil.TypeAllowsNull(expression.Type), "We should only project types which are nullable."); 1809typeArguments[typeArgumentIndex++] = WebUtil.GetWrapperType(skipTokenTypes, Strings.BasicExpandProvider_SDP_UnsupportedOrderingExpressionBreadth); 1812this.elementType = WebUtil.GetWrapperType(typeArguments, Strings.BasicExpandProvider_UnsupportedExpandBreadth);
System\Data\Services\Providers\DataServicePagingProviderWrapper.cs (1)
80WebUtil.Dispose(this.pagingProvider);
System\Data\Services\Providers\DataServiceProviderWrapper.cs (6)
725WebUtil.Dispose(this.metadataProvider); 731WebUtil.Dispose(this.queryProvider); 894string resourceTypeName = WebUtil.GetTypeName(clrType); 939return WebUtil.GetService<T>(this.metadataProvider); 946T result = WebUtil.GetService<T>(dataService.Instance); 973return WebUtil.GetService<T>(this.metadataProvider);
System\Data\Services\Providers\DataServiceStreamProviderWrapper.cs (6)
174WebUtil.WriteETagValueInResponseHeader(this.GetStreamETag(entity, operationContext), operationContext.Host); 192WebUtil.WriteETagValueInResponseHeader(this.GetStreamETag(entity, operationContext), operationContext.Host); 197WebUtil.Dispose(readStream); 226WebUtil.Dispose(writeStream); 317if (!WebUtil.IsETagValueValid(etag, true)) 381WebUtil.Dispose(this.streamProvider);
System\Data\Services\Providers\EntityPropertyMappingInfo.cs (2)
216resourceType = WebUtil.GetNonPrimitiveResourceType(provider, element); 221object propertyValue = WebUtil.GetPropertyValue(provider, element, resourceType, resourceProperty, resourceProperty == null ? propertyName : null);
System\Data\Services\Providers\ObjectContextServiceProvider.cs (4)
960Debug.Assert(!WebUtil.IsPrimitiveType(type), "Why are we trying to load metadata for a primitive type?"); 1223WebUtil.IsPrimitiveType(((PrimitiveType)type).ClrEquivalentType), 1430Debug.Assert(!WebUtil.IsPrimitiveType(propertyClrType), "We don't support collections of primitives, we shouldn't see one here"); 2353MethodInfo genericMethod = typeof(ObjectContext).GetMethod("CreateQuery", WebUtil.PublicInstanceBindingFlags).MakeGenericMethod(container.ResourceType.InstanceType);
System\Data\Services\Providers\ReflectionServiceProvider.cs (8)
200if (WebUtil.IsPrimitiveType(property.PropertyType) && 250IgnorePropertiesAttribute.GetProperties(this.Type, true /*inherit*/, WebUtil.PublicInstanceBindingFlags)); 251PropertyInfo[] properties = this.Type.GetProperties(WebUtil.PublicInstanceBindingFlags); 314PropertyInfo propertyInfo = this.Type.GetProperty(resourceContainer.Name, WebUtil.PublicInstanceBindingFlags); 435foreach (PropertyInfo property in type.GetProperties(WebUtil.PublicInstanceBindingFlags | BindingFlags.DeclaredOnly)) 603BindingFlags bindingFlags = WebUtil.PublicInstanceBindingFlags; 931return WebUtil.EmptyStringArray; 1004string genericNamespace = WebUtil.GetModelTypeNamespace(genericArguments[i]);
System\Data\Services\Providers\ResourceAssociationSet.cs (3)
52WebUtil.CheckStringArgumentNull(name, "name"); 53WebUtil.CheckArgumentNull(end1, "end1"); 54WebUtil.CheckArgumentNull(end2, "end2");
System\Data\Services\Providers\ResourceAssociationSetEnd.cs (2)
51WebUtil.CheckArgumentNull(resourceSet, "resourceSet"); 52WebUtil.CheckArgumentNull(resourceType, "resourceType");
System\Data\Services\Providers\ResourceContainer.cs (2)
53WebUtil.CheckStringArgumentNull(name, "name"); 54WebUtil.CheckArgumentNull(elementType, "elementType");
System\Data\Services\Providers\ResourceProperty.cs (3)
61WebUtil.CheckStringArgumentNull(name, "name"); 62WebUtil.CheckArgumentNull(propertyResourceType, "propertyResourceType"); 132if (!WebUtil.IsValidMimeType(value))
System\Data\Services\Providers\ResourceType.cs (15)
44WebUtil.PublicInstanceBindingFlags); 49WebUtil.PublicInstanceBindingFlags); 136WebUtil.CheckArgumentNull(instanceType, "instanceType"); 137WebUtil.CheckStringArgumentNull(name, "name"); 138WebUtil.CheckResourceTypeKind(resourceTypeKind, "resourceTypeKind"); 161Debug.Assert(WebUtil.IsPrimitiveType(type), "This constructor should be called only for primitive types"); 181WebUtil.CheckArgumentNull(type, "type"); 182WebUtil.CheckArgumentNull(name, "name"); 453WebUtil.CreateNewInstanceConstructor(this.InstanceType, this.FullName, typeof(object)); 579WebUtil.CheckArgumentNull(type, "type"); 581foreach (ResourceType resourceType in WebUtil.GetPrimitiveTypes()) 598WebUtil.CheckArgumentNull(property, "property"); 614WebUtil.CheckArgumentNull(attribute, "attribute"); 793propertyType = WebUtil.TryResolveResourceType(deserializer.Service.Provider, foundTypeName); 1110BindingFlags bindingFlags = WebUtil.PublicInstanceBindingFlags;
System\Data\Services\Providers\ServiceOperation.cs (4)
68WebUtil.CheckStringArgumentNull(name, "name"); 69WebUtil.CheckServiceOperationResultKind(resultKind, "resultKind"); 70WebUtil.CheckStringArgumentNull(method, "method"); 138if (!WebUtil.IsValidMimeType(value))
System\Data\Services\Providers\ServiceOperationParameter.cs (2)
38WebUtil.CheckStringArgumentNull(name, "name"); 39WebUtil.CheckArgumentNull(parameterType, "parameterType");
System\Data\Services\QueryInterceptorAttribute.cs (1)
30this.entitySetName = WebUtil.CheckArgumentNull(entitySetName, "entitySetName");
System\Data\Services\RequestDescription.cs (6)
108WebUtil.DebugEnumIsDefined(targetKind); 356IEnumerator queryResults = WebUtil.GetRequestEnumerator(segmentInfo.RequestEnumerable); 360WebUtil.CheckResourceExists(queryResults.MoveNext(), segmentInfo.Identifier); 372WebUtil.Dispose(queryResults); 394WebUtil.IsElementIEnumerable(result, out enumerable)) 549if (WebUtil.IsAtomMimeType(acceptTypesText))
System\Data\Services\RequestQueryProcessor.cs (5)
231Expression nullConstant = WebUtil.NullLiteral; 891WebUtil.CheckSyntaxValid(KeyInstance.TryParseNullableTokens(skipToken, out k)); 923WebUtil.CheckSyntaxValid(KeyInstance.TryParseNullableTokens(skipToken, out k)); 1185Type resultWrapperType = WebUtil.GetWrapperType(new Type[] { queryElementType, skipTokenWrapperType }, null); 1227return WebUtil.GetWrapperType(skipTokenTypes, Strings.BasicExpandProvider_SDP_UnsupportedOrderingExpressionBreadth);
System\Data\Services\RequestUriProcessor.cs (18)
475WebUtil.CheckSyntaxValid(queryPortion == null); 482WebUtil.CheckSyntaxValid(queryPortion == null); 497WebUtil.DebugEnumIsDefined(segment.Operation.ResultKind); 530WebUtil.CheckResourceExists(segment.RequestQueryable != null, segment.Identifier); 548WebUtil.CheckResourceExists(segment.SingleResult || methodResult != null, segment.Identifier); // Enumerations shouldn't be null. 552WebUtil.CheckSyntaxValid(queryPortion == null); 567WebUtil.CheckSyntaxValid(!segment.SingleResult); 590WebUtil.CheckResourceExists(container != null, segment.Identifier); 599WebUtil.CheckResourceExists(segment.RequestQueryable != null, segment.Identifier); 714WebUtil.CheckSyntaxValid(!hasQuery); 824WebUtil.CheckResourceExists(previous.TargetResourceType.IsOpenType, segment.Identifier); 900WebUtil.CheckSyntaxValid(!segment.SingleResult); 950WebUtil.CheckSyntaxValid(KeyInstance.TryParseKeysFromUri(filter, out key)); 960WebUtil.CheckSyntaxValid(key.TryConvertValues(resourceType)); 1074WebUtil.CheckSyntaxValid(parameterType.IsClass || underlyingType != null); 1086WebUtil.CheckSyntaxValid(WebConvert.IsKeyValueQuoted(queryStringValue)); 1089WebUtil.CheckSyntaxValid(WebConvert.TryKeyStringToPrimitive(queryStringValue, targetType, out operationParameters[i])); 1102WebUtil.CheckSyntaxValid(filter.Length > 0 && filter[0] == '(' && filter[filter.Length - 1] == ')');
System\Data\Services\ResponseBodyWriter.cs (3)
211if (!WebUtil.IsCatchableExceptionType(exception)) 222WebUtil.Dispose(this.queryResults); 223WebUtil.Dispose(this.mediaResourceStream);
System\Data\Services\Serializers\BatchWriter.cs (1)
65writer.WriteLine("{0} {1} {2}", XmlConstants.HttpVersionInBatching, host.ResponseStatusCode, WebUtil.GetStatusCodeText(host.ResponseStatusCode));
System\Data\Services\Serializers\BinarySerializer.cs (1)
72WebUtil.CopyStream(inputStream, this.outputStream, bufferSize);
System\Data\Services\Serializers\Deserializer.cs (13)
145ContentFormat requestFormat = WebUtil.SelectRequestFormat(mimeType, description); 254requestFormat = WebUtil.GetResponseFormatForPrimitiveValue(description.TargetResourceType, out contentType); 255if (!WebUtil.CompareMimeType(contentType, mimeType)) 312requestFormat = WebUtil.SelectRequestFormat(mimeType, description); 613WebUtil.CopyStream(requestStream, writeStream, service.StreamProvider.StreamBufferSize); 895WebUtil.RecurseEnter(RecursionLimit, ref this.recursionDepth); 901WebUtil.RecurseLeave(ref this.recursionDepth); 923WebUtil.CheckResourceExists(resourceCookie != null, requestDescription.LastSegmentInfo.Identifier); 977WebUtil.CheckResourceExists(resourceCookie != null, segmentInfo.Identifier); 1029if (WebUtil.IsAtomMimeType(this.Service.OperationContext.Host.RequestAccept)) 1036WebUtil.CheckVersion(this.Service, this.RequestDescription); 1099if (requestValue == null || WebUtil.IsPrimitiveType(requestValue.GetType())) 1105if (WebUtil.GetNonPrimitiveResourceType(provider, requestValue).ResourceTypeKind == ResourceTypeKind.ComplexType)
System\Data\Services\Serializers\JsonDeserializer.cs (5)
165if (WebUtil.IsCatchableExceptionType(e)) 345(segmentInfo.TargetKind == RequestTargetKind.OpenProperty && WebUtil.IsPrimitiveType(nonEntityResource.GetType()))) 355(segmentInfo.TargetKind == RequestTargetKind.OpenProperty && WebUtil.IsPrimitiveType(jsonObject.GetType())) || 640if (propertyValue == null || WebUtil.IsPrimitiveType(propertyValue.GetType())) 648ResourceType openPropertyResourceType = WebUtil.GetResourceType(this.Service.Provider, propertyValue);
System\Data\Services\Serializers\JsonReader.cs (2)
506WebUtil.RecurseEnter(RecursionLimit, ref this.recursionDepth); 512WebUtil.RecurseLeave(ref this.recursionDepth);
System\Data\Services\Serializers\JsonSerializer.cs (6)
274ResourceType elementType = WebUtil.GetRootType(resourceType); 478if (WebUtil.IsElementIEnumerable(element, out enumerableElement)) 537WebUtil.Dispose(elements); 543ResourceType resourceType = WebUtil.GetResourceType(this.Provider, element); 736propertyResourceType = WebUtil.GetResourceType(this.Provider, propertyValue); 817object propertyValue = WebUtil.GetPropertyValue(this.Provider, customObject, resourceType, null, propertyName);
System\Data\Services\Serializers\PlainXmlDeserializer.cs (6)
115Debug.Assert(WebUtil.IsPrimitiveType(typeToBeConverted), "WebUtil.IsPrimitiveType(typeToBeConverted)"); 147if (!WebUtil.XmlReaderEnsureElement(this.xmlReader)) 201if (!WebUtil.XmlReaderEnsureElement(this.xmlReader)) 384if (!WebUtil.XmlReaderEnsureElement(reader)) 480resourceType = WebUtil.TryResolveResourceType(this.Service.Provider, typeName); 555if (!WebUtil.XmlReaderEnsureElement(propertyReader))
System\Data\Services\Serializers\PlainXmlSerializer.cs (6)
118WebUtil.WriteSpacePreserveAttributeIfNecessary(writer, propertyText); 156resourceType = WebUtil.GetResourceType(this.Provider, element); 181this.RequestDescription.TargetResourceType : WebUtil.GetResourceType(this.Provider, element); 290object propertyValue = WebUtil.GetPropertyValue(this.Provider, element, resourceType, property, null); 318ResourceType propertyResourceType = WebUtil.GetResourceType(this.Provider, value); 390ResourceType resourceType = WebUtil.GetNonPrimitiveResourceType(this.Provider, element);
System\Data\Services\Serializers\Serializer.cs (7)
263return WebUtil.GetPropertyValue(provider, customObject, null, property, null); 559WebUtil.RecurseEnter(RecursionLimit, ref this.recursionDepth); 565WebUtil.RecurseLeave(ref this.recursionDepth); 720return WebUtil.GetETagValue(this.service, resource, this.CurrentContainer); 738ResourceType resourceType = WebUtil.GetNonPrimitiveResourceType(provider, resource); 747object keyValue = WebUtil.GetPropertyValue(provider, resource, resourceType, property, null); 1239object value = WebUtil.GetPropertyValue(this.provider, this.element, null, property, null);
System\Data\Services\Serializers\SyndicationDeserializer.cs (4)
246if (!WebUtil.CompareMimeType(contentType, XmlConstants.MimeApplicationXml)) 256WebUtil.XmlReaderEnsureElement(reader); 276WebUtil.Dispose(reader); 523WebUtil.CheckResourceExists(targetResource != null, description.LastSegmentInfo.Identifier);
System\Data\Services\Serializers\SyndicationSerializer.cs (11)
188resourcePropertyType = (element == null) ? ResourceType.PrimitiveStringResourceType : WebUtil.GetResourceType(this.Provider, element); 426ResourceType resourceType = WebUtil.GetNonPrimitiveResourceType(this.Provider, element); 494ResourceType actualResourceType = WebUtil.GetNonPrimitiveResourceType(this.Provider, element); 683WebUtil.Dispose(elements); 828object propertyValue = WebUtil.GetPropertyValue(this.Provider, customObject, resourceType, property, null); 853object propertyValue = WebUtil.GetPropertyValue(this.Provider, customObject, resourceType, property, null); 892propertyResourceType = WebUtil.GetResourceType(this.Provider, value); 964object propertyValue = WebUtil.GetPropertyValue(this.Provider, customObject, resourceType, property, property == null ? propertyName : null); 980propertyResourceType = WebUtil.GetResourceType(this.Provider, propertyValue); 1089bool collection = WebUtil.IsElementIEnumerable(expandedPropertyValue, out enumerable); 1112WebUtil.Dispose(enumerator);
System\Data\Services\UpdatableWrapper.cs (3)
151ResourceType resourceType = WebUtil.GetNonPrimitiveResourceType(this.service.Provider, actualEntity); 193string etagValue = WebUtil.GetETagValue(resourceCookie, resourceType, etagProperties, this.service, false /*getMethod*/); 318WebUtil.Dispose(this.updateProvider);
System\Data\Services\WebUtil.cs (17)
47internal static readonly MethodInfo GetNamedPropertyValueMethodInfo = typeof(WebUtil).GetMethod( 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)) 634ResourceType[] types = WebUtil.GetPrimitiveTypes(); 918keyValue = WebUtil.GetPropertyValue(service.Provider, resource, resourceType, property, null); 959ResourceType resourceType = WebUtil.GetNonPrimitiveResourceType(service.Provider, resource); 963return WebUtil.GetETagValue(resource, resourceType, etagProperties, service, true /*getMethod*/); 1070ResourceType resourceType = WebUtil.GetNonPrimitiveResourceType(service.Provider, parentEntityResource); 1096etag = WebUtil.GetETagValue(parentEntityToken, resourceType, etagProperties, service, true /*getMethod*/); 1113etag = WebUtil.GetETagValue(parentEntityResource, resourceType, etagProperties, service, true /*getMethod*/); 1187if (WebUtil.IsWhitespace(reader.Value)) 1336return WebUtil.GenericExpandedWrapperTypes.Single(x => x.Index == wrapperParameters.Length - 1).Type.MakeGenericType(wrapperParameters); 1346return inputType.IsGenericType && WebUtil.GenericExpandedWrapperTypes.SingleOrDefault(x => x.Type == inputType.GetGenericTypeDefinition()) != null; 1610return WebUtil.CompareMimeType(mime, XmlConstants.MimeApplicationAtom);