예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseOperation"/> class.
        /// </summary>
        /// <param name="configuration">Operation configuration.</param>
        protected BaseOperation(ServiceOperationElement configuration, IHttpContextAccessor accessor, IMemoryCache cache, IServiceProvider serviceProvider)
        {
            this.Configuration = configuration;

            this.ServiceName = this.Configuration.Service;
            this.RequestName = this.Configuration.Operation;
            this.Version     = this.Configuration.Version;

            this.Accessor        = accessor;
            this.Cache           = cache;
            this.ServiceProvider = serviceProvider;

            var url    = UriHelper.GetDisplayUrl(this.Accessor.HttpContext.Request);
            var logger = serviceProvider.GetService <ILogger <BaseOperation> >();

            logger.LogDebug("BaseOperation constructor, uri = {0}", url);

            //  Set service base uri
            this.ServiceBaseUri = new Uri(url);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="GetResourceByIdOperation"/> class.
 /// </summary>
 /// <param name="configuration">Operation configuration.</param>
 public GetResourceByIdOperation(ServiceOperationElement configuration, SosEntitiesFactory entitiesFactory, IHttpContextAccessor accessor, IMemoryCache cache, IServiceProvider serviceProvider)
     : base(configuration, entitiesFactory, accessor, cache, serviceProvider)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GetCapabilitiesOperation"/> class.
 /// </summary>
 /// <param name="configuration">Operation configuration.</param>
 public GetCapabilitiesOperation(ServiceOperationElement configuration, IHttpContextAccessor accessor, IMemoryCache cache, IServiceProvider serviceProvider)
     : base(configuration, accessor, cache, serviceProvider)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BaseSosOperation"/> class.
 /// </summary>
 /// <param name="configuration">Operation configuration.</param>
 protected BaseSosOperation(ServiceOperationElement configuration, SosEntitiesFactory entitiesFactory, IHttpContextAccessor accessor, IMemoryCache cache, IServiceProvider serviceProvider)
     : base(configuration, accessor, cache, serviceProvider)
 {
     this.entitiesFactory = entitiesFactory;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DescribeSensorOperation"/> class.
 /// </summary>
 /// <param name="configuration">Operation configuration.</param>
 public DescribeProcessOperation(ServiceOperationElement configuration, IHttpContextAccessor accessor, IMemoryCache cache, IServiceProvider serviceProvider)
     : base(configuration, accessor, cache, serviceProvider)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BaseWpsOperation"/> class.
 /// </summary>
 /// <param name="configuration">Operation configuration.</param>
 protected BaseWpsOperation(ServiceOperationElement configuration, IHttpContextAccessor accessor, IMemoryCache cache, IServiceProvider serviceProvider)
     : base(configuration, accessor, cache, serviceProvider)
 {
 }