/// <summary> /// Initializes a new instance of the <see cref="EntryValueMaterializationPolicy" /> class. /// </summary> /// <param name="context">The context.</param> /// <param name="entityTrackingAdapter">The entity tracking adapter.</param> /// <param name="lazyPrimitivePropertyConverter">The lazy primitive property converter.</param> /// <param name="nextLinkTable">The next link table.</param> internal EntryValueMaterializationPolicy( IODataMaterializerContext context, EntityTrackingAdapter entityTrackingAdapter, DSClient.SimpleLazy <PrimitivePropertyConverter> lazyPrimitivePropertyConverter, Dictionary <IEnumerable, DataServiceQueryContinuation> nextLinkTable) : base(context, lazyPrimitivePropertyConverter) { this.nextLinkTable = nextLinkTable; this.EntityTrackingAdapter = entityTrackingAdapter; }
/// <summary> /// Initializes a new instance of the <see cref="ODataMaterializer" /> class. /// </summary> /// <param name="materializerContext">The materializer context.</param> /// <param name="expectedType">The expected type.</param> protected ODataMaterializer(IODataMaterializerContext materializerContext, Type expectedType) { this.ExpectedType = expectedType; this.MaterializerContext = materializerContext; this.nextLinkTable = new Dictionary <IEnumerable, DataServiceQueryContinuation>(DSClient.ReferenceEqualityComparer <IEnumerable> .Instance); this.lazyPrimitivePropertyConverter = new DSClient.SimpleLazy <PrimitivePropertyConverter>(() => new PrimitivePropertyConverter(this.Format)); this.primitiveValueMaterializationPolicy = new PrimitiveValueMaterializationPolicy(this.MaterializerContext, this.lazyPrimitivePropertyConverter); this.collectionValueMaterializationPolicy = new CollectionValueMaterializationPolicy(this.MaterializerContext, this.primitiveValueMaterializationPolicy); this.complexValueMaterializerPolicy = new ComplexValueMaterializationPolicy(this.MaterializerContext, this.lazyPrimitivePropertyConverter); this.collectionValueMaterializationPolicy.ComplexValueMaterializationPolicy = this.complexValueMaterializerPolicy; this.complexValueMaterializerPolicy.CollectionValueMaterializationPolicy = this.collectionValueMaterializationPolicy; }
/// <summary> /// Initializes a new instance of the <see cref="ComplexValueMaterializationPolicy" /> class. /// </summary> /// <param name="materializerContext">The materializer context.</param> /// <param name="lazyPrimitivePropertyConverter">The lazy primitive property converter.</param> internal ComplexValueMaterializationPolicy(IODataMaterializerContext materializerContext, DSClient.SimpleLazy <PrimitivePropertyConverter> lazyPrimitivePropertyConverter) : base(materializerContext, lazyPrimitivePropertyConverter) { }
/// <summary> /// Initializes a new instance of the <see cref="StructuralValueMaterializationPolicy" /> class. /// </summary> /// <param name="materializerContext">The materializer context.</param> /// <param name="lazyPrimitivePropertyConverter">The lazy primitive property converter.</param> protected StructuralValueMaterializationPolicy(IODataMaterializerContext materializerContext, DSClient.SimpleLazy <PrimitivePropertyConverter> lazyPrimitivePropertyConverter) { Debug.Assert(materializerContext != null, "materializer!=null"); this.MaterializerContext = materializerContext; this.lazyPrimitivePropertyConverter = lazyPrimitivePropertyConverter; }