-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Review for System.Web adapters (Part 1): HttpContext #42090
Comments
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
API Review Notes:
namespace System.Web
{
public partial class HttpBrowserCapabilities : System.Web.Configuration.HttpCapabilitiesBase
{
internal HttpBrowserCapabilities() { }
}
public partial class HttpBrowserCapabilitiesBase
{
public HttpBrowserCapabilitiesBase() { }
public virtual string Browser { get { throw null; } }
public virtual bool Crawler { get { throw null; } }
public virtual int MajorVersion { get { throw null; } }
public virtual double MinorVersion { get { throw null; } }
public virtual string Platform { get { throw null; } }
public virtual string Version { get { throw null; } }
}
public partial class HttpBrowserCapabilitiesWrapper : System.Web.HttpBrowserCapabilitiesBase
{
public HttpBrowserCapabilitiesWrapper(System.Web.HttpBrowserCapabilities capabilities) { }
public override string Browser { get { throw null; } }
public override bool Crawler { get { throw null; } }
public override int MajorVersion { get { throw null; } }
public override double MinorVersion { get { throw null; } }
public override string Platform { get { throw null; } }
public override string Version { get { throw null; } }
}
public partial class HttpContext : System.IServiceProvider
{
#if NET6_0_OR_GREATER
public static implicit operator System.Web.HttpContext (Microsoft.AspNetCore.Http.HttpContext context) { throw null; }
public static implicit operator Microsoft.AspNetCore.Http.HttpContext (System.Web.HttpContext context) { throw null; }
#endif
internal HttpContext() { }
public System.Web.Caching.Cache Cache { get { throw null; } }
public static System.Web.HttpContext Current { get { throw null; } }
public System.Collections.IDictionary Items { get { throw null; } }
public System.Web.HttpRequest Request { get { throw null; } }
public System.Web.HttpResponse Response { get { throw null; } }
public System.Web.HttpServerUtility Server { get { throw null; } }
public System.Web.SessionState.HttpSessionState Session { get { throw null; } }
public System.Security.Principal.IPrincipal User { get { throw null; } set { } }
object System.IServiceProvider.GetService(System.Type service) { throw null; }
}
public partial class HttpContextBase : System.IServiceProvider
{
protected HttpContextBase() { }
public virtual System.Collections.IDictionary Items { get { throw null; } }
public virtual System.Web.HttpRequestBase Request { get { throw null; } }
public virtual System.Web.HttpResponseBase Response { get { throw null; } }
public virtual System.Web.HttpServerUtilityBase Server { get { throw null; } }
public virtual System.Web.HttpSessionStateBase Session { get { throw null; } }
public virtual System.Security.Principal.IPrincipal User { get { throw null; } set { } }
public virtual object GetService(System.Type serviceType) { throw null; }
#if NET6_0_OR_GREATER
public static implicit operator System.Web.HttpContextBase (Microsoft.AspNetCore.Http.HttpContext context) { throw null; }
#endif
}
public partial class HttpContextWrapper : System.Web.HttpContextBase
{
public HttpContextWrapper(System.Web.HttpContext httpContext) { }
public override System.Collections.IDictionary Items { get { throw null; } }
public override System.Web.HttpRequestBase Request { get { throw null; } }
public override System.Web.HttpResponseBase Response { get { throw null; } }
public override System.Web.HttpSessionStateBase Session { get { throw null; } }
public override System.Security.Principal.IPrincipal User { get { throw null; } set { } }
}
public sealed partial class HttpCookie
{
public HttpCookie(string name) { }
public HttpCookie(string name, string value) { }
public string Domain { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public bool HasKeys { get { throw null; } }
public System.DateTime Expires { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public string this[string key] { get { throw null; } set { } }
public bool HttpOnly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public string Path { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public System.Web.SameSiteMode SameSite { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public bool Secure { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public bool Shareable { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public string Value { get { throw null; } set { } }
public System.Collections.Specialized.NameValueCollection Values { get { throw null; } }
}
public sealed partial class HttpCookieCollection : System.Collections.Specialized.NameObjectCollectionBase
{
public HttpCookieCollection() { }
public string[] AllKeys { get { throw null; } }
public System.Web.HttpCookie this[int index] { get { throw null; } }
public System.Web.HttpCookie this[string name] { get { throw null; } }
public void Add(System.Web.HttpCookie cookie) { }
public void Clear() { }
public System.Web.HttpCookie Get(int index) { throw null; }
public System.Web.HttpCookie Get(string name) { throw null; }
public string GetKey(int index) { throw null; }
public void Remove(string name) { }
public void Set(System.Web.HttpCookie cookie) { }
}
public partial class HttpException : System.SystemException
{
public HttpException() { }
public HttpException(string message) { }
public HttpException(string message, System.Exception innerException) { }
}
public partial class HttpRequest
{
#if NET6_0_OR_GREATER
public static implicit operator System.Web.HttpRequest (Microsoft.AspNetCore.Http.HttpRequest request) { throw null; }
public static implicit operator Microsoft.AspNetCore.Http.HttpRequest (System.Web.HttpRequest request) { throw null; }
#endif
internal HttpRequest() { }
public string ApplicationPath { get { throw null; } }
public string AppRelativeCurrentExecutionFilePath { get { throw null; } }
public System.Web.HttpBrowserCapabilities Browser { get { throw null; } }
public System.Text.Encoding ContentEncoding { get { throw null; } }
public int ContentLength { get { throw null; } }
public string ContentType { get { throw null; } set { } }
public System.Web.HttpCookieCollection Cookies { get { throw null; } }
public System.Collections.Specialized.NameValueCollection Form { get { throw null; } }
public System.Collections.Specialized.NameValueCollection Headers { get { throw null; } }
public string HttpMethod { get { throw null; } }
public System.IO.Stream InputStream { get { throw null; } }
public bool IsAuthenticated { get { throw null; } }
public bool IsLocal { get { throw null; } }
public bool IsSecureConnection { get { throw null; } }
public System.Security.Principal.IIdentity LogonUserIdentity { get { throw null; } }
public string Path { get { throw null; } }
public System.Collections.Specialized.NameValueCollection QueryString { get { throw null; } }
public string RawUrl { get { throw null; } }
public string RequestType { get { throw null; } }
public System.Collections.Specialized.NameValueCollection ServerVariables { get { throw null; } }
public int TotalBytes { get { throw null; } }
public System.Uri Url { get { throw null; } }
public System.Uri UrlReferrer { get { throw null; } }
public string UserAgent { get { throw null; } }
public string UserHostAddress { get { throw null; } }
public string UserHostName { get { throw null; } }
public string[] UserLanguages { get { throw null; } }
public void Abort() { }
public byte[] BinaryRead(int count) { throw null; }
}
public abstract partial class HttpRequestBase
{
protected HttpRequestBase() { }
public string ApplicationPath { get { throw null; } }
public string AppRelativeCurrentExecutionFilePath { get { throw null; } }
public virtual System.Web.HttpBrowserCapabilities Browser { get { throw null; } }
public virtual System.Text.Encoding ContentEncoding { get { throw null; } }
public virtual int ContentLength { get { throw null; } }
public virtual string ContentType { get { throw null; } set { } }
public virtual System.Web.HttpCookieCollection Cookies { get { throw null; } }
public virtual System.Collections.Specialized.NameValueCollection Headers { get { throw null; } }
public virtual string HttpMethod { get { throw null; } }
public virtual System.IO.Stream InputStream { get { throw null; } }
public virtual bool IsAuthenticated { get { throw null; } }
public virtual bool IsLocal { get { throw null; } }
public bool IsSecureConnection { get { throw null; } }
public virtual System.Security.Principal.IIdentity LogonUserIdentity { get { throw null; } }
public virtual string Path { get { throw null; } }
public virtual System.Collections.Specialized.NameValueCollection QueryString { get { throw null; } }
public virtual string RawUrl { get { throw null; } }
public virtual string RequestType { get { throw null; } }
public System.Collections.Specialized.NameValueCollection ServerVariables { get { throw null; } }
public virtual int TotalBytes { get { throw null; } }
public virtual System.Uri Url { get { throw null; } }
public virtual System.Uri UrlReferrer { get { throw null; } }
public virtual string UserAgent { get { throw null; } }
public virtual string UserHostAddress { get { throw null; } }
public virtual string UserHostName { get { throw null; } }
public virtual string[] UserLanguages { get { throw null; } }
public virtual void Abort() { }
public virtual byte[] BinaryRead(int count) { throw null; }
}
public partial class HttpRequestWrapper : System.Web.HttpRequestBase
{
public HttpRequestWrapper(System.Web.HttpRequest request) { }
public override System.Web.HttpBrowserCapabilitiesBase Browser { get { throw null; } }
public override System.Text.Encoding ContentEncoding { get { throw null; } }
public override int ContentLength { get { throw null; } }
public override string ContentType { get { throw null; } set { } }
public override System.Web.HttpCookieCollection Cookies { get { throw null; } }
public override System.Collections.Specialized.NameValueCollection Headers { get { throw null; } }
public override string HttpMethod { get { throw null; } }
public override System.IO.Stream InputStream { get { throw null; } }
public override bool IsAuthenticated { get { throw null; } }
public override bool IsLocal { get { throw null; } }
public override System.Security.Principal.IIdentity LogonUserIdentity { get { throw null; } }
public override string Path { get { throw null; } }
public override System.Collections.Specialized.NameValueCollection QueryString { get { throw null; } }
public override string RawUrl { get { throw null; } }
public override string RequestType { get { throw null; } }
public override int TotalBytes { get { throw null; } }
public override System.Uri Url { get { throw null; } }
public override System.Uri UrlReferrer { get { throw null; } }
public override string UserAgent { get { throw null; } }
public override string UserHostAddress { get { throw null; } }
public override string UserHostName { get { throw null; } }
public override string[] UserLanguages { get { throw null; } }
public override void Abort() { }
public override byte[] BinaryRead(int count) { throw null; }
}
public partial class HttpResponse
{
#if NET6_0_OR_GREATER
public static implicit operator System.Web.HttpResponse (Microsoft.AspNetCore.Http.HttpResponse response) { throw null; }
public static implicit operator Microsoft.AspNetCore.Http.HttpResponse (System.Web.HttpResponse response) { throw null; }
#endif
internal HttpResponse() { }
public string Charset { get { throw null; } set { } }
public System.Text.Encoding ContentEncoding { get { throw null; } set { } }
public string ContentType { get { throw null; } set { } }
public System.Web.HttpCookieCollection Cookies { get { throw null; } }
public System.Collections.Specialized.NameValueCollection Headers { get { throw null; } }
public bool IsClientConnected { get { throw null; } }
public System.IO.TextWriter Output { get { throw null; } set { } }
public System.IO.Stream OutputStream { get { throw null; } }
public int StatusCode { get { throw null; } set { } }
public string StatusDescription { get { throw null; } set { } }
public bool SuppressContent { get { throw null; } set { } }
public bool TrySkipIisCustomErrors { get { throw null; } set { } }
public void AddHeader(string name, string value) { }
public void AppendHeader(string name, string value) { }
public void Clear() { }
public void ClearContent() { }
public void End() { }
public void SetCookie(System.Web.HttpCookie cookie) { }
public void Write(char ch) { }
public void Write(object obj) { }
public void Write(string s) { }
}
public partial class HttpResponseBase
{
public HttpResponseBase() { }
public string Charset { get { throw null; } set { } }
public virtual System.Text.Encoding ContentEncoding { get { throw null; } set { } }
public virtual string ContentType { get { throw null; } set { } }
public virtual System.Web.HttpCookieCollection Cookies { get { throw null; } }
public virtual System.Collections.Specialized.NameValueCollection Headers { get { throw null; } }
public virtual bool IsClientConnected { get { throw null; } }
public virtual System.IO.TextWriter Output { get { throw null; } set { } }
public virtual System.IO.Stream OutputStream { get { throw null; } }
public virtual int StatusCode { get { throw null; } set { } }
public virtual string StatusDescription { get { throw null; } set { } }
public virtual bool SuppressContent { get { throw null; } set { } }
public virtual bool TrySkipIisCustomErrors { get { throw null; } set { } }
public virtual void AddHeader(string name, string value) { }
public void AppendHeader(string name, string value) { }
public void Clear() { }
public void ClearContent() { }
public void End() { }
public virtual void SetCookie(System.Web.HttpCookie cookie) { }
public virtual void Write(char ch) { }
public virtual void Write(object obj) { }
public virtual void Write(string s) { }
}
public partial class HttpResponseWrapper : System.Web.HttpResponseBase
{
public HttpResponseWrapper(System.Web.HttpResponse response) { }
public override System.Text.Encoding ContentEncoding { get { throw null; } set { } }
public override string ContentType { get { throw null; } set { } }
public override System.Web.HttpCookieCollection Cookies { get { throw null; } }
public override System.Collections.Specialized.NameValueCollection Headers { get { throw null; } }
public override bool IsClientConnected { get { throw null; } }
public override System.IO.TextWriter Output { get { throw null; } set { } }
public override System.IO.Stream OutputStream { get { throw null; } }
public override int StatusCode { get { throw null; } set { } }
public override string StatusDescription { get { throw null; } set { } }
public override bool SuppressContent { get { throw null; } set { } }
public override bool TrySkipIisCustomErrors { get { throw null; } set { } }
public override void AddHeader(string name, string value) { }
public override void SetCookie(System.Web.HttpCookie cookie) { }
public override void Write(char ch) { }
public override void Write(object obj) { }
public override void Write(string s) { }
}
public sealed partial class HttpRuntime
{
public static string AppDomainAppVirtualPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
}
public partial class HttpServerUtility
{
internal HttpServerUtility() { }
public string MachineName { get { throw null; } }
public void ClearError() { }
public System.Exception GetLastError() { throw null; }
[System.ObsoleteAttribute("Not implemented yet for ASP.NET Core")]
public string MapPath(string path) { throw null; }
public static byte[] UrlTokenDecode(string input) { throw null; }
public static string UrlTokenEncode(byte[] input) { throw null; }
}
public partial class HttpServerUtilityBase
{
public HttpServerUtilityBase() { }
public virtual string MachineName { get { throw null; } }
public virtual void ClearError() { }
public virtual System.Exception GetLastError() { throw null; }
[System.ObsoleteAttribute("Not implemented yet for ASP.NET Core")]
public virtual string MapPath(string path) { throw null; }
public virtual byte[] UrlTokenDecode(string input) { throw null; }
public virtual string UrlTokenEncode(byte[] input) { throw null; }
}
public partial class HttpServerUtilityWrapper : System.Web.HttpServerUtilityBase
{
public HttpServerUtilityWrapper(System.Web.HttpServerUtility utility) { }
public override string MachineName { get { throw null; } }
public override void ClearError() { }
public override System.Exception GetLastError() { throw null; }
[System.ObsoleteAttribute("Not implemented yet for ASP.NET Core")]
public override string MapPath(string path) { throw null; }
public override byte[] UrlTokenDecode(string input) { throw null; }
public override string UrlTokenEncode(byte[] input) { throw null; }
}
public abstract partial class HttpSessionStateBase
{
protected HttpSessionStateBase() { }
public virtual int Count { get { throw null; } }
public virtual bool IsNewSession { get { throw null; } }
public virtual bool IsReadOnly { get { throw null; } }
public virtual object this[string name] { get { throw null; } set { } }
public virtual string SessionID { get { throw null; } }
public virtual int Timeout { get { throw null; } set { } }
public virtual void Abandon() { }
public virtual void Add(string name, object value) { }
public virtual void Clear() { }
public virtual void Remove(string name) { }
public virtual void RemoveAll() { }
}
public partial class HttpSessionStateWrapper : System.Web.HttpSessionStateBase
{
public HttpSessionStateWrapper(System.Web.SessionState.HttpSessionState session) { }
public override int Count { get { throw null; } }
public override bool IsNewSession { get { throw null; } }
public override bool IsReadOnly { get { throw null; } }
public override object this[string name] { get { throw null; } set { } }
public override string SessionID { get { throw null; } }
public override int Timeout { get { throw null; } set { } }
public override void Abandon() { }
public override void Add(string name, object value) { }
public override void Clear() { }
public override void Remove(string name) { }
public override void RemoveAll() { }
}
public sealed partial class HttpUnhandledException : System.Web.HttpException
{
public HttpUnhandledException() { }
public HttpUnhandledException(string message) { }
public HttpUnhandledException(string message, System.Exception innerException) { }
}
public enum SameSiteMode
{
Lax = 1,
None = 0,
Strict = 2,
}
}
namespace System.Web.Caching
{
public sealed partial class Cache : System.Collections.IEnumerable
{
public static readonly System.DateTime NoAbsoluteExpiration;
public static readonly System.TimeSpan NoSlidingExpiration;
public int Count { get { throw null; } }
public object this[string key] { get { throw null; } set { } }
public object Add(string key, object value, System.Web.Caching.CacheDependency dependencies, System.DateTime absoluteExpiration, System.TimeSpan slidingExpiration, System.Web.Caching.CacheItemPriority priority, System.Web.Caching.CacheItemRemovedCallback onRemoveCallback) { throw null; }
public object Get(string key) { throw null; }
public System.Collections.IEnumerator GetEnumerator() { throw null; }
public void Insert(string key, object value) { }
public void Insert(string key, object value, System.Web.Caching.CacheDependency dependencies, System.DateTime absoluteExpiration, System.TimeSpan slidingExpiration) { }
public void Insert(string key, object value, System.Web.Caching.CacheDependency dependencies, System.DateTime absoluteExpiration, System.TimeSpan slidingExpiration, System.Web.Caching.CacheItemPriority priority, System.Web.Caching.CacheItemRemovedCallback onRemoveCallback) { }
public void Insert(string key, object value, System.Web.Caching.CacheDependency dependencies, System.DateTime absoluteExpiration, System.TimeSpan slidingExpiration, System.Web.Caching.CacheItemUpdateCallback onUpdateCallback) { }
public object Remove(string key) { throw null; }
}
public partial class CacheDependency
{
internal CacheDependency() { }
}
public enum CacheItemPriority
{
AboveNormal = 4,
BelowNormal = 2,
Default = 3,
High = 5,
Low = 1,
Normal = 3,
NotRemovable = 6,
}
public delegate void CacheItemRemovedCallback(string key, object value, System.Web.Caching.CacheItemRemovedReason reason);
public enum CacheItemRemovedReason
{
DependencyChanged = 4,
Expired = 2,
Removed = 1,
Underused = 3,
}
public delegate void CacheItemUpdateCallback(string key, System.Web.Caching.CacheItemUpdateReason reason, out object expensiveObject, out System.Web.Caching.CacheDependency dependency, out System.DateTime absoluteExpiration, out System.TimeSpan slidingExpiration);
public enum CacheItemUpdateReason
{
DependencyChanged = 2,
Expired = 1,
}
}
namespace System.Web.Configuration
{
public partial class HttpCapabilitiesBase
{
internal HttpCapabilitiesBase() { }
public string Browser { get { throw null; } }
public bool Crawler { get { throw null; } }
public int MajorVersion { get { throw null; } }
public double MinorVersion { get { throw null; } }
public string Platform { get { throw null; } }
public string Version { get { throw null; } }
}
}
namespace System.Web.SessionState
{
public partial class HttpSessionState : System.Collections.ICollection, System.Collections.IEnumerable
{
public int Count { get { throw null; } }
public bool IsNewSession { get { throw null; } }
public bool IsReadOnly { get { throw null; } }
public bool IsSynchronized { get { throw null; } }
public object this[string name] { get { throw null; } set { } }
public string SessionID { get { throw null; } }
public object SyncRoot { get { throw null; } }
public int Timeout { get { throw null; } set { } }
public void Abandon() { }
public void Add(string name, object value) { }
public void Clear() { }
public void CopyTo(System.Array array, int index) { }
public System.Collections.IEnumerator GetEnumerator() { throw null; }
public void Remove(string name) { }
public void RemoveAll() { }
}
} |
Thanks for contacting us. We're moving this issue to the |
Background and Motivation
We've been developing some adapters to help with migrating from ASP.NET Framework that adapter the
System.Web.HttpContext
to theMicrosoft.AspNetCore.Http.HttpContext
. We've released Preview 1 and would like to review the API shape.This issue focuses on the APIs being brought forth from
System.Web
. The package targets .NET Standard, .NET 6, and .NET Framework. On .NET Framework, the types unify withSystem.Web.dll
. Subsequent issues will have the APIs for the .NET Core/.NET Framework APIs needed to tie things together.Related API Designs:
Proposed API
Usage Examples
These APIs are expected to be drop-in replacements for class libraries that are using
HttpContext
. There should be no difference in usage at that level.In order to convert between
System.Web.HttpContext
andMicrosoft.AspNetCore.Http.HttpContext
, implicit conversions are used. These conversions will cache the adapter in theCoreHttpContext.Features
object in case there are multiple conversions that occur. The instances of these objects cannot be constructed on .NET Standard since there's no type we can use there that will unify with .NET Framework.Example usage:
The text was updated successfully, but these errors were encountered: