Ejemplo n.º 1
0
 public AbpApiExplorer(IAbpWebApiConfiguration abpWebApiConfiguration, HttpConfiguration config)
     : base(config)
 {
     _apiDescriptions = new Lazy<Collection<ApiDescription>>(InitializeApiDescriptions);
     _abpWebApiConfiguration = abpWebApiConfiguration;
     _config = config;
 }
Ejemplo n.º 2
0
        public DynamicHttpActionDescriptor(
            IAbpWebApiConfiguration configuration,
            HttpControllerDescriptor controllerDescriptor,
            DynamicApiActionInfo actionInfo)
            : base(
                controllerDescriptor,
                actionInfo.Method)
        {
            _actionInfo          = actionInfo;
            SupportedHttpMethods = new Collection <HttpMethod> {
                actionInfo.Verb.ToHttpMethod()
            };

            Properties["__AbpDynamicApiActionInfo"] = actionInfo;
            Properties["__AbpDynamicApiDontWrapResultAttribute"] =
                ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault(
                    actionInfo.Method,
                    configuration.DefaultDynamicApiWrapResultAttribute
                    );

            _filters    = new Lazy <Collection <IFilter> >(GetFiltersInternal, true);
            _parameters = new Lazy <Collection <HttpParameterDescriptor> >(GetParametersInternal, true);

            _declaredOnlyAttributes = _actionInfo.Method.GetCustomAttributes(inherit: false);
            _attributes             = _actionInfo.Method.GetCustomAttributes(inherit: true);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="AbpApiExceptionFilterAttribute"/> class.
 /// </summary>
 public AbpApiExceptionFilterAttribute(IAbpWebApiConfiguration configuration)
 {
     _configuration = configuration;
     Logger = NullLogger.Instance;
     EventBus = NullEventBus.Instance;
     AbpSession = NullAbpSession.Instance;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AbpApiExceptionFilterAttribute"/> class.
 /// </summary>
 public AbpApiExceptionFilterAttribute(IAbpWebApiConfiguration configuration)
 {
     Configuration = configuration;
     Logger        = NullLogger.Instance;
     EventBus      = NullEventBus.Instance;
     AbpSession    = NullAbpSession.Instance;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AbpApiExceptionFilterAttribute"/> class.
 /// </summary>
 public BlocksApiExceptionFilterAttribute(IAbpWebApiConfiguration configuration, ILocalizationContext localizationContext)
 {
     Configuration = configuration;
     Logger        = NullLogger.Instance;
     //  EventBus = NullEventBus.Instance;
     AbpSession           = NullAbpSession.Instance;
     _localizationContext = localizationContext;
 }
Ejemplo n.º 6
0
 public AbpApiUowFilter(
     IUnitOfWorkManager unitOfWorkManager,
     IAbpWebApiConfiguration configuration
     )
 {
     _unitOfWorkManager = unitOfWorkManager;
     _configuration = configuration;
 }
Ejemplo n.º 7
0
 public AbpApiUowFilter(
     IUnitOfWorkManager unitOfWorkManager,
     IAbpWebApiConfiguration configuration
     )
 {
     _unitOfWorkManager = unitOfWorkManager;
     _configuration     = configuration;
 }
Ejemplo n.º 8
0
 public GatewayAuthorizeAttribute(
     IAbpWebApiConfiguration configuration,
     IServiceContext serviceContext,
     ISessionManager sessionManager)
 {
     _configuration  = configuration;
     _serviceContext = serviceContext;
     _sessionManager = sessionManager;
 }
 public AbpApiAuthorizeFilter(
     IAuthorizationHelper authorizationHelper,
     IAbpWebApiConfiguration configuration,
     ILocalizationManager localizationManager)
 {
     _authorizationHelper = authorizationHelper;
     _configuration       = configuration;
     _localizationManager = localizationManager;
 }
Ejemplo n.º 10
0
 public AbpApiExplorer(
     IAbpWebApiConfiguration abpWebApiConfiguration,
     DynamicApiControllerManager dynamicApiControllerManager
     ) : base(abpWebApiConfiguration.HttpConfiguration)
 {
     _apiDescriptions             = new Lazy <Collection <ApiDescription> >(InitializeApiDescriptions);
     _abpWebApiConfiguration      = abpWebApiConfiguration;
     _dynamicApiControllerManager = dynamicApiControllerManager;
 }
Ejemplo n.º 11
0
 public AbpApiExplorer(
     IAbpWebApiConfiguration abpWebApiConfiguration,
     DynamicApiControllerManager dynamicApiControllerManager
     ) : base(abpWebApiConfiguration.HttpConfiguration)
 {
     _apiDescriptions = new Lazy<Collection<ApiDescription>>(InitializeApiDescriptions);
     _abpWebApiConfiguration = abpWebApiConfiguration;
     _dynamicApiControllerManager = dynamicApiControllerManager;
 }
Ejemplo n.º 12
0
 public AbpApiUowFilter(
     IUnitOfWorkManager unitOfWorkManager,
     IAbpWebApiConfiguration webApiConfiguration,
     IUnitOfWorkDefaultOptions unitOfWorkDefaultOptions)
 {
     _unitOfWorkManager        = unitOfWorkManager;
     _webApiConfiguration      = webApiConfiguration;
     _unitOfWorkDefaultOptions = unitOfWorkDefaultOptions;
 }
Ejemplo n.º 13
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="abpAntiForgeryManager"></param>
 /// <param name="webApiConfiguration"></param>
 /// <param name="antiForgeryWebConfiguration"></param>
 public AbpAntiForgeryApiFilter(
     IAbpAntiForgeryManager abpAntiForgeryManager,
     IAbpWebApiConfiguration webApiConfiguration,
     IAbpAntiForgeryWebConfiguration antiForgeryWebConfiguration)
 {
     _abpAntiForgeryManager       = abpAntiForgeryManager;
     _webApiConfiguration         = webApiConfiguration;
     _antiForgeryWebConfiguration = antiForgeryWebConfiguration;
     Logger = NullLogger.Instance;
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AbpApiExceptionFilterAttribute"/> class.
 /// </summary>
 public AbpApiExceptionFilterAttribute(
     IAbpWebApiConfiguration configuration,
     IAbpWebCommonModuleConfiguration abpWebCommonModuleConfiguration)
 {
     this.AbpWebCommonModuleConfiguration = abpWebCommonModuleConfiguration;
     Configuration = configuration;
     Logger        = NullLogger.Instance;
     EventBus      = NullEventBus.Instance;
     AbpSession    = NullAbpSession.Instance;
 }
 public AbpAntiForgeryApiFilter(
     IAbpAntiForgeryManager abpAntiForgeryManager, 
     IAbpWebApiConfiguration webApiConfiguration,
     IAbpAntiForgeryWebConfiguration antiForgeryWebConfiguration)
 {
     _abpAntiForgeryManager = abpAntiForgeryManager;
     _webApiConfiguration = webApiConfiguration;
     _antiForgeryWebConfiguration = antiForgeryWebConfiguration;
     Logger = NullLogger.Instance;
 }
 public AbpApiAuthorizeFilter(
     IAuthorizationHelper authorizationHelper, 
     IAbpWebApiConfiguration configuration,
     ILocalizationManager localizationManager,
     IEventBus eventBus)
 {
     _authorizationHelper = authorizationHelper;
     _configuration = configuration;
     _localizationManager = localizationManager;
     _eventBus = eventBus;
 }
Ejemplo n.º 17
0
 public AbpApiAuthorizeFilter(
     IAuthorizationHelper authorizationHelper,
     IAbpWebApiConfiguration configuration,
     ILocalizationManager localizationManager,
     IEventBus eventBus,
     IAbpWebCommonModuleConfiguration abpWebCommonModuleConfiguration)
 {
     _authorizationHelper             = authorizationHelper;
     _configuration                   = configuration;
     _localizationManager             = localizationManager;
     _eventBus                        = eventBus;
     _abpWebCommonModuleConfiguration = abpWebCommonModuleConfiguration;
 }
        public DynamicHttpActionDescriptor(
            IAbpWebApiConfiguration configuration,
            HttpControllerDescriptor controllerDescriptor,
            MethodInfo methodInfo,
            IFilter[] filters = null)
            : base(controllerDescriptor, 
                  methodInfo)
        {
            _filters = filters;

            Properties["__AbpDynamicApiDontWrapResultAttribute"] =
                ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault(
                    methodInfo,
                    configuration.DefaultDynamicApiWrapResultAttribute
                );
        }
Ejemplo n.º 19
0
        public DynamicHttpActionDescriptor(
            IAbpWebApiConfiguration configuration,
            HttpControllerDescriptor controllerDescriptor,
            MethodInfo methodInfo,
            IFilter[] filters = null)
            : base(
                controllerDescriptor,
                methodInfo)
        {
            _filters = filters;

            Properties["__AbpDynamicApiDontWrapResultAttribute"] =
                ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault(
                    methodInfo,
                    configuration.DefaultDynamicApiWrapResultAttribute
                    );
        }
        public DynamicHttpActionDescriptor(
            IAbpWebApiConfiguration configuration,
            HttpControllerDescriptor controllerDescriptor,
            DynamicApiActionInfo actionInfo)
            : base(
                  controllerDescriptor,
                  actionInfo.Method)
        {
            _actionInfo = actionInfo;
            SupportedHttpMethods = new Collection<HttpMethod> { actionInfo.Verb.ToHttpMethod() };

            Properties["__AbpDynamicApiActionInfo"] = actionInfo;
            Properties["__AbpDynamicApiDontWrapResultAttribute"] =
                ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault(
                    actionInfo.Method,
                    configuration.DefaultDynamicApiWrapResultAttribute
                );

            _filters = new Lazy<Collection<IFilter>>(GetFiltersInternal, true);
            _parameters = new Lazy<Collection<HttpParameterDescriptor>>(GetParametersInternal, true);
        }
Ejemplo n.º 21
0
 public ResultWrapperHandler(IAbpWebApiConfiguration webApiConfiguration)
 {
     _webApiConfiguration = webApiConfiguration;
 }
 public AbpApiControllerActionSelector(IAbpWebApiConfiguration configuration)
 {
     _configuration = configuration;
 }
 public AbpApiControllerActionSelector(IAbpWebApiConfiguration configuration)
 {
     _configuration = configuration;
 }
 public ResultWrapperHandler(IAbpWebApiConfiguration configuration)
 {
     _configuration = configuration;
 }
 public AbpApiValidationFilter(IIocResolver iocResolver, IAbpWebApiConfiguration configuration)
 {
     _iocResolver   = iocResolver;
     _configuration = configuration;
 }
Ejemplo n.º 26
0
 public AbpApiExplorer(IAbpWebApiConfiguration abpWebApiConfiguration, HttpConfiguration config) : base(config)
 {
     _apiDescriptions        = new Lazy <Collection <ApiDescription> >(InitializeApiDescriptions);
     _abpWebApiConfiguration = abpWebApiConfiguration;
     _config = config;
 }
 public ResultWrapperHandler(IAbpWebApiConfiguration webApiConfiguration)
 {
     _webApiConfiguration = webApiConfiguration;
 }
 public AbpApiValidationFilter(IIocResolver iocResolver, IAbpWebApiConfiguration configuration)
 {
     _iocResolver = iocResolver;
     _configuration = configuration;
 }
 public ResultWrapperHandler(IAbpWebApiConfiguration configuration,
                             IAbpWebCommonModuleConfiguration abpWebCommonModuleConfiguration)
 {
     _configuration = configuration;
     _abpWebCommonModuleConfiguration = abpWebCommonModuleConfiguration;
 }
 public ResultWrapperHandler(IAbpWebApiConfiguration configuration)
 {
     _configuration = configuration;
 }
 public TextPlainErrorResult(CustomHttpException exception)
 {
     _configuration       = IocManager.Instance.Resolve <IAbpWebApiConfiguration>();
     this.HandleException = exception;
 }
Ejemplo n.º 32
0
 public AbpSignatureApiFilter(IAbpWebApiConfiguration webApiConfiguration)
 {
     _webApiConfiguration = webApiConfiguration;
 }