HttpEncoder.Current 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置将在应用程序中使用的 HttpEncoder 类型。
public:
static property System::Web::Util::HttpEncoder ^ Current { System::Web::Util::HttpEncoder ^ get(); void set(System::Web::Util::HttpEncoder ^ value); };
public static System.Web.Util.HttpEncoder Current { get; set; }
member this.Current : System.Web.Util.HttpEncoder with get, set
Public Shared Property Current As HttpEncoder
属性值
对将要使用的编码器/解码器类型的引用。
例外
分配给此属性的编码器实例是 null
。
注解
如果 HttpEncoder 在配置文件中指定派生类型,则属性将 Current 返回对自定义类型的引用。 但是,如果未使用自定义编码器,则属性将返回对默认 ASP.NET 实例的引用 HttpEncoder 。
此 Current 属性不是线程安全的。 仅在应用程序的方法中设置此属性 Application_Start
,因为 Application_Start
在单个线程上运行。