/// <summary> /// Gets the IEdmFunctionImport that describes the payload. /// </summary> public virtual IEdmFunctionImport GetFunctionImport(ODataDeserializerContext context) { HttpConfiguration configuration = context.Request.GetConfiguration(); if (configuration == null) { throw Error.InvalidOperation(SRResources.RequestMustContainConfiguration); } IODataActionResolver resolver = configuration.GetODataActionResolver(); Contract.Assert(resolver != null); return(resolver.Resolve(context)); }
/// <summary> /// Sets the <see cref="IODataActionResolver"/> on the configuration /// </summary> /// <param name="configuration">Configuration to be updated.</param> /// <param name="resolver">The <see cref="IODataActionResolver"/> this configuration should use.</param> public static void SetODataActionResolver(this HttpConfiguration configuration, IODataActionResolver resolver) { if (configuration == null) { throw Error.ArgumentNull("configuration"); } if (resolver == null) { throw Error.ArgumentNull("resolver"); } configuration.Properties[ODataActionResolverKey] = resolver; }