/// <summary> /// Constructs a KeyLookupNode. /// </summary> /// <param name="source">The collection that this key is referring to.</param> /// <param name="keyPropertyValues">List of the properties and their values that we use to look up our return value.</param> /// <exception cref="System.ArgumentNullException">Throws if the input source is null.</exception> public KeyLookupNode(EntityCollectionNode source, IEnumerable <KeyPropertyValue> keyPropertyValues) { ExceptionUtils.CheckArgumentNotNull(source, "source"); this.source = source; this.entitySet = source.EntitySet; this.entityTypeReference = source.EntityItemType; this.keyPropertyValues = keyPropertyValues; }
/// <summary> /// Creates a <see cref="EntityRangeVariable"/>. /// </summary> /// <param name="name"> The name of the associated any/all parameter (null if none)</param> /// <param name="entityType">The entity type of each item in the collection that this range variable iterates over.</param> /// <param name="entitySet">The Entity set of the collection this node iterates over.</param> /// <exception cref="System.ArgumentNullException">Throws if the input name or entityType is null.</exception> public EntityRangeVariable(string name, IEdmEntityTypeReference entityType, IEdmEntitySet entitySet) { ExceptionUtils.CheckArgumentNotNull(name, "name"); ExceptionUtils.CheckArgumentNotNull(entityType, "entityType"); this.name = name; this.entityTypeReference = entityType; this.entityCollectionNode = null; this.entitySet = entitySet; }
/// <summary> /// Create a CollectionCastNode with the given source node and the given target type. /// </summary> /// <param name="source">Parent <see cref="CollectionNode"/> that is being cast.</param> /// <param name="entityType">Type to cast to.</param> /// <exception cref="System.ArgumentNullException">Throws if the input source or entityType are null.</exception> public EntityCollectionCastNode(EntityCollectionNode source, IEdmEntityType entityType) { ExceptionUtils.CheckArgumentNotNull(source, "source"); ExceptionUtils.CheckArgumentNotNull(entityType, "entityType"); this.source = source; this.edmTypeReference = new EdmEntityTypeReference(entityType, false); this.entitySet = source.EntitySet; // creating a new collection type here because the type in the request is just the item type, there is no user-provided collection type. this.collectionTypeReference = EdmCoreModel.GetCollection(this.edmTypeReference); }