internal ApiParameterContext( IModelMetadataProvider metadataProvider, ODataRouteBuilderContext routeContext, IModelTypeBuilder modelTypeBuilder) { RouteContext = routeContext; MetadataProvider = metadataProvider; TypeBuilder = modelTypeBuilder; }
internal ApiParameterContext( IModelMetadataProvider metadataProvider, ODataRouteBuilderContext routeContext, ModelTypeBuilder modelTypeBuilder) { Contract.Requires(metadataProvider != null); Contract.Requires(routeContext != null); Contract.Requires(modelTypeBuilder != null); RouteContext = routeContext; MetadataProvider = metadataProvider; TypeBuilder = modelTypeBuilder; }
internal PseudoParameterDescriptionScope(ODataRouteBuilderContext context) { this.context = context; var parameters = context.ParameterDescriptions; original = parameters.ToArray(); parameters.Clear(); for (var i = 0; i < context.ActionDescriptor.Parameters.Count; i++) { var parameter = context.ActionDescriptor.Parameters[i]; parameters.Add(new ApiParameterDescription() { Name = parameter.Name, ParameterDescriptor = parameter, Type = parameter.ParameterType, }); } }
internal PseudoParameterDescriptionScope(ODataRouteBuilderContext context) { Contract.Requires(context != null); this.context = context; var parameters = context.ParameterDescriptions; original = parameters.ToArray(); parameters.Clear(); foreach (var parameter in context.ActionDescriptor.Parameters) { parameters.Add(new ApiParameterDescription() { Name = parameter.Name, ParameterDescriptor = parameter, Type = parameter.ParameterType, }); } }