示例#1
0
        /// <inheritdoc/>
        public static void ApplyTo(
            ApiConfiguration configuration,
            Type targetType)
        {
            Ensure.NotNull(configuration, "configuration");
            Ensure.NotNull(targetType, "targetType");

            var provider = new ConventionBasedApiModelBuilder(targetType);

            configuration.AddHookHandler <IModelBuilder>(provider);
            configuration.AddHookHandler <IModelMapper>(provider);
            configuration.AddHookHandler <IQueryExpressionExpander>(provider);
            configuration.AddHookHandler <IQueryExpressionSourcer>(provider);
        }
示例#2
0
 public QueryExpressionSourcer(ConventionBasedApiModelBuilder modelCache)
 {
     ModelCache = modelCache;
 }
示例#3
0
 public ModelMapper(ConventionBasedApiModelBuilder modelCache)
 {
     ModelCache = modelCache;
 }
 public QueryExpressionSourcer(ConventionBasedApiModelBuilder modelCache)
 {
     ModelCache = modelCache;
 }
 public ModelMapper(ConventionBasedApiModelBuilder modelCache)
 {
     ModelCache = modelCache;
 }