JavaScriptEncoder.Create Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Create(TextEncoderSettings) |
Creates a new instance of JavaScriptEncoder class with the specified settings. |
Create(UnicodeRange[]) |
Creates a new instance of the JavaScriptEncoder class that specifies characters the encoder is allowed to not encode. |
Create(TextEncoderSettings)
- Source:
- JavaScriptEncoder.cs
- Source:
- JavaScriptEncoder.cs
- Source:
- JavaScriptEncoder.cs
Creates a new instance of JavaScriptEncoder class with the specified settings.
public:
static System::Text::Encodings::Web::JavaScriptEncoder ^ Create(System::Text::Encodings::Web::TextEncoderSettings ^ settings);
public static System.Text.Encodings.Web.JavaScriptEncoder Create (System.Text.Encodings.Web.TextEncoderSettings settings);
static member Create : System.Text.Encodings.Web.TextEncoderSettings -> System.Text.Encodings.Web.JavaScriptEncoder
Public Shared Function Create (settings As TextEncoderSettings) As JavaScriptEncoder
Parameters
- settings
- TextEncoderSettings
Settings that control how the JavaScriptEncoder instance encodes, primarily which characters to encode.
Returns
A new instance of the JavaScriptEncoder class.
Exceptions
settings
is null
.
Applies to
Create(UnicodeRange[])
- Source:
- JavaScriptEncoder.cs
- Source:
- JavaScriptEncoder.cs
- Source:
- JavaScriptEncoder.cs
Creates a new instance of the JavaScriptEncoder class that specifies characters the encoder is allowed to not encode.
public:
static System::Text::Encodings::Web::JavaScriptEncoder ^ Create(... cli::array <System::Text::Unicode::UnicodeRange ^> ^ allowedRanges);
public static System.Text.Encodings.Web.JavaScriptEncoder Create (params System.Text.Unicode.UnicodeRange[] allowedRanges);
static member Create : System.Text.Unicode.UnicodeRange[] -> System.Text.Encodings.Web.JavaScriptEncoder
Public Shared Function Create (ParamArray allowedRanges As UnicodeRange()) As JavaScriptEncoder
Parameters
- allowedRanges
- UnicodeRange[]
The set of characters that the encoder is allowed to not encode.
Returns
A new instance of the JavaScriptEncoder class.
Exceptions
allowedRanges
is null
.
Remarks
Some characters in allowedRanges
might still be encoded; that is, this parameter indicates what ranges the encoder is allowed to not encode, not what characters it must not encode.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기