/// <summary> /// Initialize DataServiceContext with the specified EntityParameterSendOption. /// </summary> /// <param name="option">The option to send entity parameters.</param> private void InitializeDataServiceContext(EntityParameterSendOption option) { InitializeDataServiceContext(); dsc.EntityParameterSendOption = option; Assert.AreEqual(option, dsc.EntityParameterSendOption); }
/// <summary> /// Validate EntityParameterSendOption /// </summary> /// <param name="value">option to validate</param> /// <param name="parameterName">name of the parameter being validated</param> /// <exception cref="System.ArgumentOutOfRangeException">if option is not valid</exception> /// <returns>option</returns> internal static EntityParameterSendOption CheckEnumerationValue(EntityParameterSendOption value, string parameterName) { switch (value) { case EntityParameterSendOption.SendFullProperties: case EntityParameterSendOption.SendOnlySetProperties: return(value); default: throw Error.ArgumentOutOfRange(parameterName); } }
private void PostPropertiesOfEntityParameterToAction(EntityParameterSendOption option) { TestClientContext.EntityParameterSendOption = option; var customer = TestClientContext.CustomersPlus.First(); OrderPlus order = new OrderPlus(); var collection = new DataServiceCollection <OrderPlus>(TestClientContext, "OrdersPlus", null, null); collection.Add(order); int orderId = (new Random()).Next(); order.OrderIDPlus = orderId; order.OrderShelfLifesPlus = new ObservableCollection <TimeSpan>(); OrderPlus orderCreated = customer.PlaceOrderPlus(order).GetValue(); Assert.Equal(orderId, orderCreated.OrderIDPlus); }
/// <summary> /// Creates a new instance of the Serializer. /// </summary> /// <param name="requestInfo">the request info.</param> /// <param name="sendOption">The option to send entity operation parameters.</param> internal Serializer(RequestInfo requestInfo, EntityParameterSendOption sendOption) : this(requestInfo) { this.sendOption = sendOption; }
/// <summary> /// Creates a new instance of the Serializer. /// </summary> /// <param name="requestInfo">the request info.</param> /// <param name="sendOption">The option to send entity operation parameters.</param> internal Serializer(RequestInfo requestInfo, EntityParameterSendOption sendOption) : this(requestInfo) { this.sendOption = sendOption; }
/// <summary> /// Initialize DataServiceContext with the specified EntityParameterSendOption. /// </summary> /// <param name="option">The option to send entity parameters.</param> private void InitializeDataServiceContext(EntityParameterSendOption option) { InitializeDataServiceContext(); dsc.EntityParameterSendOption = option; Assert.AreEqual(option, dsc.EntityParameterSendOption); }