1 instantiation of ClientType
System.Data.Services.Client (1)
System\Data\Services\Client\ClientType.cs (1)
417
clientType = new
ClientType
(type, type.ToString(), skipSettableCheck); // ToString expands generic type name where as FullName does not
162 references to ClientType
System.Data.Services.Client (162)
parent\Server\System\Data\Services\Providers\EntityPropertyMappingInfo.cs (6)
19
using ClientTypeOrResourceType_Alias = System.Data.Services.Client.
ClientType
;
52
private readonly
ClientTypeOrResourceType_Alias
actualPropertyType;
78
public EntityPropertyMappingInfo(EntityPropertyMappingAttribute attribute, Type definingType,
ClientType
actualPropertyType)
128
private static object ReadPropertyValue(object element,
ClientType
resourceType, string[] srcPathSegments, int currentSegment)
138
ClientType
.ClientProperty resourceProperty = resourceType.GetProperty(srcPathPart, true);
157
resourceProperty.IsKnownType ? null :
ClientType
.Create(resourceProperty.PropertyType),
System\Data\Services\Client\ALinq\ExpressionNormalizer.cs (1)
176
if(!(
ClientType
.CheckElementTypeIsEntity(visited.Operand.Type) && ProjectionAnalyzer.IsCollectionProducingExpression(visited.Operand)))
System\Data\Services\Client\ALinq\PathBox.cs (2)
106
if (
ClientType
.CheckElementTypeIsEntity(t))
131
if (
ClientType
.CheckElementTypeIsEntity(t))
System\Data\Services\Client\ALinq\ProjectionAnalyzer.cs (22)
51
if (
ClientType
.CheckElementTypeIsEntity(le.Body.Type))
82
bool knownEntityType =
ClientType
.CheckElementTypeIsEntity(e.Body.Type);
179
if (me != null &&
ClientType
.Create(me.Expression.Type, false).IsEntityType)
204
bool knownEntityType =
ClientType
.CheckElementTypeIsEntity(mie.Type);
333
bool targetIsEntity =
ClientType
.CheckElementTypeIsEntity(targetType);
334
bool sourceIsEntity =
ClientType
.CheckElementTypeIsEntity(lastExpression.Type);
401
if (!
ClientType
.CheckElementTypeIsEntity(m.Expression.Type) || IsCollectionProducingExpression(m.Expression))
472
if (
ClientType
.CheckElementTypeIsEntity(nex.Type))
564
if (
ClientType
.CheckElementTypeIsEntity(u.Operand.Type))
575
if (
ClientType
.CheckElementTypeIsEntity(b.Left.Type) ||
ClientType
.CheckElementTypeIsEntity(b.Right.Type)
586
if (
ClientType
.CheckElementTypeIsEntity(b.Expression.Type) || IsCollectionProducingExpression(b.Expression))
603
if (
ClientType
.CheckElementTypeIsEntity(c.Test.Type) ||
ClientType
.CheckElementTypeIsEntity(c.IfTrue.Type) ||
ClientType
.CheckElementTypeIsEntity(c.IfFalse.Type)
635
if (!
ClientType
.CheckElementTypeIsEntity(m.Expression.Type) || IsCollectionProducingExpression(m.Expression))
667
if ((m.Object != null ?
ClientType
.CheckElementTypeIsEntity(m.Object.Type) : false)
668
|| m.Arguments.Any(a =>
ClientType
.CheckElementTypeIsEntity(a.Type)))
678
if (
ClientType
.CheckElementTypeIsEntity(iv.Expression.Type) || IsCollectionProducingExpression(iv.Expression)
679
|| iv.Arguments.Any(a =>
ClientType
.CheckElementTypeIsEntity(a.Type) || IsCollectionProducingExpression(a)))
702
if (
ClientType
.CheckElementTypeIsEntity(nex.Type) &&
724
if (
ClientType
.CheckElementTypeIsEntity(c.Type))
System\Data\Services\Client\ALinq\ProjectionRewriter.cs (1)
48
ClientType
.CheckElementTypeIsEntity(le.Parameters[0].Type) || // only attempt to rewrite if lambda parameter is not an entity type
System\Data\Services\Client\ALinq\ResourceBinder.cs (2)
1525
ClientType
clientType =
ClientType
.Create(type, false /* expectModelType */);
System\Data\Services\Client\AtomEntry.cs (1)
113
public
ClientType
ActualType
System\Data\Services\Client\AtomMaterializer.cs (40)
512
ClientType
.ClientProperty property =
ClientType
.Create(expectedType).GetProperty(propertyName, false);
556
ClientType
entryType = entry.ActualType ??
ClientType
.Create(expectedType);
559
ClientType
.ClientProperty property = null;
575
entryType =
ClientType
.Create(property.NullablePropertyType, false);
662
if (entry.ShouldUpdateFromPayload &&
ClientType
.Create(property.NullablePropertyType, false).IsEntityType)
667
bool isEntity = property.CollectionType == null || !
ClientType
.CheckElementTypeIsEntity(property.CollectionType);
740
ClientType
attributeSourceType = MaterializeAtom.GetEntryClientType(entry.TypeName, materializer.context, expectedType, false);
745
ClientType
.ClientProperty property =
ClientType
.Create(expectedType).GetProperty(propertyName, false);
756
Type collectionType =
ClientType
.GetImplementationType(segment.ProjectionType, typeof(ICollection<>));
759
collectionType =
ClientType
.GetImplementationType(segment.ProjectionType, typeof(IEnumerable<>));
809
ClientType
complexType =
ClientType
.Create(property.PropertyType);
912
internal static void ValidatePropertyMatch(
ClientType
.ClientProperty property, AtomContentProperty atomProperty)
989
ClientType
targetType =
ClientType
.Create(underlyingExpectedType);
1115
MethodInfo addMethod =
ClientType
.GetAddToCollectionMethod(listType, out listElementType);
1137
private static object GetOrCreateCollectionProperty(object instance,
ClientType
.ClientProperty property, Type collectionType)
1209
ClientType
nestedElementType = null;
1223
if (!
ClientType
.CanAssignNull(type))
1261
ClientType
actualType,
1300
private static void ApplyDataValue(
ClientType
type, AtomContentProperty property, bool ignoreMissingProperties, DataServiceContext context, object instance)
1324
ClientType
complexType =
ClientType
.Create(prop.PropertyType);
1357
private static void ApplyDataValues(
ClientType
type, IEnumerable<AtomContentProperty> properties, bool ignoreMissingProperties, DataServiceContext context, object instance)
1432
private static void ApplyEntityPropertyMappings(AtomEntry entry,
ClientType
entryType)
1570
private void MergeLists(AtomEntry entry,
ClientType
.ClientProperty property, IEnumerable list, Uri nextLink, ProjectionPlan plan)
1617
entry.ActualType =
ClientType
.Create(entry.ResolvedObject.GetType());
1643
entry.ActualType =
ClientType
.Create(entry.ResolvedObject.GetType());
1672
entry.ActualType =
ClientType
.Create(type);
1693
ClientType
actualType = MaterializeAtom.GetEntryClientType(entry.TypeName, this.context, expectedEntryType, true);
1770
ClientType
.ClientProperty property,
1778
ClientType
collectionType =
ClientType
.Create(property.CollectionType);
1799
ClientType
.ClientProperty property,
1809
ClientType
collectionType =
ClientType
.Create(property.CollectionType);
1912
ClientType
actualType = entry.ActualType;
System\Data\Services\Client\AtomMaterializerLog.cs (2)
406
ClientType
type =
ClientType
.Create(entity.GetType());
System\Data\Services\Client\Binding\BindingEntityInfo.cs (7)
68
internal static
ClientType
GetClientType(Type entityType)
206
return
ClientType
.Create(type).IsEntityType;
282
bindingEntityInfo.ClientType =
ClientType
.Create(entityType);
284
foreach (
ClientType
.ClientProperty p in bindingEntityInfo.ClientType.Properties)
340
private static bool CanBeComplexProperty(
ClientType
.ClientProperty property)
364
public
ClientType
.ClientProperty PropertyInfo
398
public
ClientType
ClientType
System\Data\Services\Client\ClientType.cs (16)
48
private static readonly Dictionary<Type,
ClientType
> types = new Dictionary<Type,
ClientType
>(EqualityComparer<Type>.Default);
382
return
ClientType
.Create(t, false).IsEntityType;
390
internal static
ClientType
Create(Type type)
401
internal static
ClientType
Create(Type type, bool expectModelType)
403
ClientType
clientType;
404
lock (
ClientType
.types)
406
ClientType
.types.TryGetValue(type, out clientType);
420
lock (
ClientType
.types)
422
ClientType
existing;
423
if (
ClientType
.types.TryGetValue(type, out existing))
429
ClientType
.types.Add(type, clientType);
465
lock (
ClientType
.namedTypes)
467
foundInCache =
ClientType
.namedTypes.TryGetValue(typename, out foundType);
523
lock (
ClientType
.namedTypes)
525
ClientType
.namedTypes[typename] = foundType;
System\Data\Services\Client\DataServiceContext.cs (51)
920
ClientType
clientType =
ClientType
.Create(entity.GetType());
1428
ClientType
parentType =
ClientType
.Create(source.GetType());
1429
ClientType
.ClientProperty property = parentType.GetProperty(sourceProperty, false);
1436
ClientType
childType =
ClientType
.Create(target.GetType());
1440
ClientType
propertyElementType =
ClientType
.Create(property.CollectionType);
1814
bool collectionProperty = (null !=
ClientType
.Create(source.GetType()).GetProperty(sourceProperty, false).CollectionType);
1845
Debug.Assert(null != descriptor.Entity &&
ClientType
.Create(descriptor.Entity.GetType()).IsEntityType, "must be entity type to attach");
2175
payloadType =
ClientType
.ResolveFromName(wireName, userType);
2323
ClientType
clientType =
ClientType
.Create(entity.GetType());
2325
ClientType
.ClientProperty[] keys = clientType.Properties.Where<
ClientType
.ClientProperty>(
ClientType
.ClientProperty.GetKeyProperty).ToArray();
2326
foreach (
ClientType
.ClientProperty property in keys)
2391
bool collection = (null !=
ClientType
.Create(link.Source.GetType()).GetProperty(link.SourceProperty, false).CollectionType);
2474
private static void WriteContentProperty(XmlWriter writer, string namespaceName,
ClientType
.ClientProperty property, object propertyValue)
2523
if (!
ClientType
.Create(entity.GetType()).IsEntityType)
2537
if (
ClientType
.Create(entity.GetType()).KeyCount <= 0)
2703
bool collection = (null !=
ClientType
.Create(binding.Source.GetType()).GetProperty(binding.SourceProperty, false).CollectionType);
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;
2908
ClientType
type =
ClientType
.Create(box.Entity.GetType());
3037
ClientType
clientType = null;
3045
clientType =
ClientType
.Create(box.Entity.GetType());
3237
ClientType
type =
ClientType
.Create(entity.GetType());
3245
ClientType
.ClientProperty property = type.GetProperty(propertyName, false);
3296
private void WriteContentProperties(XmlWriter writer,
ClientType
type, object resource, EpmSourcePathSegment currentSegment, out bool propertiesWritten)
3300
foreach (
ClientType
.ClientProperty property in type.Properties)
3339
ClientType
nested =
ClientType
.Create(property.PropertyType);
3483
ClientType
type =
ClientType
.Create(source.GetType());
3487
ClientType
.ClientProperty property = type.GetProperty(sourceProperty, false);
3510
type =
ClientType
.Create(property.CollectionType ?? property.PropertyType);
3730
ClientType
type =
ClientType
.Create(this.entity.GetType());
3740
ClientType
.ClientProperty property = type.GetProperty(this.propertyName, false);
3830
private MaterializeAtom ReadPropertyFromAtom(EntityDescriptor box,
ClientType
.ClientProperty property)
3854
ClientType
clientType =
ClientType
.Create(nestedType);
3954
private MaterializeAtom ReadPropertyFromRawData(
ClientType
.ClientProperty property)
4614
ClientType
type =
ClientType
.Create(entityDescriptor.Entity.GetType());
5132
ClientType
type =
ClientType
.Create(entityDescriptor.Entity.GetType());
System\Data\Services\Client\MaterializeFromAtom.cs (6)
244
implementationType =
ClientType
.GetImplementationType(elementType, typeof(ICollection<>));
534
/// Gets the <see cref="
ClientType
"/> for the (potentially
544
/// <returns>The <see cref="
ClientType
"/> for the given type name.</returns>
545
internal static
ClientType
GetEntryClientType(string typeName, DataServiceContext context, Type expectedType, bool checkAssignable)
549
ClientType
result =
ClientType
.Create(resolvedType);
System\Data\Services\Client\ProjectionPathBuilder.cs (2)
144
bool isEntityType =
ClientType
.CheckElementTypeIsEntity(projectionType);
160
bool isEntityType =
ClientType
.CheckElementTypeIsEntity(init.Type);
System\Data\Services\Client\ProjectionPlanCompiler.cs (3)
146
if (!nullCheck.Match || !
ClientType
.CheckElementTypeIsEntity(nullCheck.AssignExpression.Type))
347
if (!this.topLevelProjectionFound || lambda.Parameters.Count == 1 &&
ClientType
.CheckElementTypeIsEntity(lambda.Parameters[0].Type))
597
if ((
ClientType
.CheckElementTypeIsEntity(assignment.Member.ReflectedType) &&