本文整理汇总了C#中Microsoft.AspNet.Http.HttpRequest.AssemblyProvider方法的典型用法代码示例。如果您正苦于以下问题:C# HttpRequest.AssemblyProvider方法的具体用法?C# HttpRequest.AssemblyProvider怎么用?C# HttpRequest.AssemblyProvider使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.AspNet.Http.HttpRequest
的用法示例。
在下文中一共展示了HttpRequest.AssemblyProvider方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ODataQueryOptions
/// <summary>
/// Initializes a new instance of the <see cref="ODataQueryOptions"/> class based on the incoming request and some metadata information from
/// the <see cref="ODataQueryContext"/>.
/// </summary>
/// <param name="context">The <see cref="ODataQueryContext"/> which contains the <see cref="IEdmModel"/> and some type information.</param>
/// <param name="request">The incoming request message.</param>
public ODataQueryOptions(ODataQueryContext context, HttpRequest request)
{
if (context == null)
{
throw Error.ArgumentNull("context");
}
if (request == null)
{
throw Error.ArgumentNull("request");
}
_assemblyProvider = request.AssemblyProvider();
Context = context;
Request = request;
RawValues = new ODataRawQueryOptions();
var queryOptionDict = request.Query.ToDictionary(p => p.Key, p => p.Value.FirstOrDefault());
_queryOptionParser = new ODataQueryOptionParser(
context.Model,
context.ElementType,
context.NavigationSource,
queryOptionDict);
BuildQueryOptions(queryOptionDict);
}