Exemplo n.º 1
0
 void IFeatureCache.CheckFeaturesRevision()
 {
     if (_cachedFeaturesRevision != _features.Revision)
     {
         _request = null;
         _query   = null;
         _form    = null;
         _cookies = null;
         _cachedFeaturesRevision = _features.Revision;
     }
 }
 void IFeatureCache.CheckFeaturesRevision()
 {
     if (_cachedFeaturesRevision != _features.Revision)
     {
         _request = null;
         _query = null;
         _form = null;
         _cookies = null;
         _cachedFeaturesRevision = _features.Revision;
     }
 }
Exemplo n.º 3
0
        public HalHttpRequest(HttpContext context)
        {
            this.HttpContext = context
                               ?? throw new ArgumentNullException(nameof(context));

            this.queryFeature = context.Features.Get <IQueryFeature>()
                                ?? throw new ArgumentException(
                                          "context should contain a IQueryFeature",
                                          nameof(context));

            this.requestFeature = context.Features.Get <IHttpRequestFeature>()
                                  ?? throw new ArgumentException(
                                            "context should contain a IHttpRequestFeature",
                                            nameof(context));

            this.requestCookiesFeature = context.Features.Get <IRequestCookiesFeature>();
        }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UrlDecodeQueryFeature"/> class.
 /// </summary>
 /// <param name="feature">The <see cref="IQueryFeature"/> instance.</param>
 public UrlDecodeQueryFeature(IQueryFeature feature)
 {
     Query = feature.Query;
 }