/// <summary> /// Initializes a new instance of the EntitySetDataRow class /// </summary> /// <param name="parent">The parent of the row</param> /// <param name="entityType">The entity type of the row</param> protected internal EntitySetDataRow(EntitySetData parent, EntityType entityType) { this.Parent = parent; this.EntityType = entityType; this.Key = new EntityDataKey(parent.Parent.GetKeyPropertyNames(entityType)); string[] nonKeyProperties; string[] dynamicPropertyPathList; this.BuildPropertyPaths(out nonKeyProperties, out dynamicPropertyPathList); this.data = new EntitySetDataRowData(this.Key, nonKeyProperties, dynamicPropertyPathList, entityType.FullName); }
public EntitySetData this[EntitySet entitySet] { get { ExceptionUtilities.CheckArgumentNotNull(entitySet, "entitySet"); EntitySetData esd; if (!this.entityDataSets.TryGetValue(entitySet, out esd)) { this.ValidateEntitySet(entitySet); esd = new EntitySetData(this, entitySet); this.entityDataSets.Add(entitySet, esd); } return(esd); } }
/// <summary> /// Initializes a new instance of the EntitySetDataRowWithStreams class /// </summary> /// <param name="parent">The parent of the row</param> /// <param name="entityType">The entity type of the row</param> public EntitySetDataRowWithStreams(EntitySetData parent, EntityType entityType) : base(parent, entityType) { this.Streams = new List<StreamData>(); }
/// <summary> /// Initializes query collection values, setting default IsSorted value to true. Therefore we enable ordering verfication by default. /// </summary> /// <param name="entitySetData">entity set data</param> /// <returns>initial query collection value</returns> protected override QueryCollectionValue BuildStubEntities(EntitySetData entitySetData) { var collection = base.BuildStubEntities(entitySetData); return QueryCollectionValue.Create(collection.Type.ElementType, collection.Elements, true); }