128 references to Encode
Microsoft.AspNetCore.Components (2)
BindConverter.cs (2)
1817
builder.Append(JsonEncodedText.
Encode
(elementFormatter(value[0], culture)?.ToString() ?? string.Empty).Value);
1823
builder.Append(JsonEncodedText.
Encode
(elementFormatter(value[i], culture)?.ToString() ?? string.Empty).Value);
Microsoft.AspNetCore.Components.Server (1)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (1)
11
private static readonly JsonEncodedText IdProperty = JsonEncodedText.
Encode
("__internalId");
Microsoft.AspNetCore.Components.Web (81)
WebEventData\ChangeEventArgsReader.cs (1)
12
private static readonly JsonEncodedText ValueKey = JsonEncodedText.
Encode
("value");
WebEventData\ClipboardEventArgsReader.cs (1)
12
private static readonly JsonEncodedText TypeKey = JsonEncodedText.
Encode
("type");
WebEventData\DragEventArgsReader.cs (8)
12
private static readonly JsonEncodedText DataTransfer = JsonEncodedText.
Encode
("dataTransfer");
13
private static readonly JsonEncodedText DropEffect = JsonEncodedText.
Encode
("dropEffect");
14
private static readonly JsonEncodedText EffectAllowed = JsonEncodedText.
Encode
("effectAllowed");
15
private static readonly JsonEncodedText Files = JsonEncodedText.
Encode
("files");
16
private static readonly JsonEncodedText Items = JsonEncodedText.
Encode
("items");
17
private static readonly JsonEncodedText Types = JsonEncodedText.
Encode
("types");
18
private static readonly JsonEncodedText Kind = JsonEncodedText.
Encode
("kind");
19
private static readonly JsonEncodedText Type = JsonEncodedText.
Encode
("type");
WebEventData\ErrorEventArgsReader.cs (5)
12
private static readonly JsonEncodedText Message = JsonEncodedText.
Encode
("message");
13
private static readonly JsonEncodedText Colno = JsonEncodedText.
Encode
("colno");
14
private static readonly JsonEncodedText Filename = JsonEncodedText.
Encode
("filename");
15
private static readonly JsonEncodedText Lineno = JsonEncodedText.
Encode
("lineno");
16
private static readonly JsonEncodedText Type = JsonEncodedText.
Encode
("type");
WebEventData\FocusEventArgsReader.cs (1)
12
private static readonly JsonEncodedText Type = JsonEncodedText.
Encode
("type");
WebEventData\KeyboardEventArgsReader.cs (10)
12
private static readonly JsonEncodedText Key = JsonEncodedText.
Encode
("key");
13
private static readonly JsonEncodedText Code = JsonEncodedText.
Encode
("code");
14
private static readonly JsonEncodedText Location = JsonEncodedText.
Encode
("location");
15
private static readonly JsonEncodedText Repeat = JsonEncodedText.
Encode
("repeat");
16
private static readonly JsonEncodedText CtrlKey = JsonEncodedText.
Encode
("ctrlKey");
17
private static readonly JsonEncodedText ShiftKey = JsonEncodedText.
Encode
("shiftKey");
18
private static readonly JsonEncodedText AltKey = JsonEncodedText.
Encode
("altKey");
19
private static readonly JsonEncodedText MetaKey = JsonEncodedText.
Encode
("metaKey");
20
private static readonly JsonEncodedText Type = JsonEncodedText.
Encode
("type");
21
private static readonly JsonEncodedText IsComposing = JsonEncodedText.
Encode
("isComposing");
WebEventData\MouseEventArgsReader.cs (18)
12
private static readonly JsonEncodedText Detail = JsonEncodedText.
Encode
("detail");
13
private static readonly JsonEncodedText ScreenX = JsonEncodedText.
Encode
("screenX");
14
private static readonly JsonEncodedText ScreenY = JsonEncodedText.
Encode
("screenY");
15
private static readonly JsonEncodedText ClientX = JsonEncodedText.
Encode
("clientX");
16
private static readonly JsonEncodedText ClientY = JsonEncodedText.
Encode
("clientY");
17
private static readonly JsonEncodedText OffsetX = JsonEncodedText.
Encode
("offsetX");
18
private static readonly JsonEncodedText OffsetY = JsonEncodedText.
Encode
("offsetY");
19
private static readonly JsonEncodedText PageX = JsonEncodedText.
Encode
("pageX");
20
private static readonly JsonEncodedText PageY = JsonEncodedText.
Encode
("pageY");
21
private static readonly JsonEncodedText MovementX = JsonEncodedText.
Encode
("movementX");
22
private static readonly JsonEncodedText MovementY = JsonEncodedText.
Encode
("movementY");
23
private static readonly JsonEncodedText Button = JsonEncodedText.
Encode
("button");
24
private static readonly JsonEncodedText Buttons = JsonEncodedText.
Encode
("buttons");
25
private static readonly JsonEncodedText CtrlKey = JsonEncodedText.
Encode
("ctrlKey");
26
private static readonly JsonEncodedText ShiftKey = JsonEncodedText.
Encode
("shiftKey");
27
private static readonly JsonEncodedText AltKey = JsonEncodedText.
Encode
("altKey");
28
private static readonly JsonEncodedText MetaKey = JsonEncodedText.
Encode
("metaKey");
29
private static readonly JsonEncodedText Type = JsonEncodedText.
Encode
("type");
WebEventData\PointerEventArgsReader.cs (8)
12
private static readonly JsonEncodedText PointerId = JsonEncodedText.
Encode
("pointerId");
13
private static readonly JsonEncodedText Width = JsonEncodedText.
Encode
("width");
14
private static readonly JsonEncodedText Height = JsonEncodedText.
Encode
("height");
15
private static readonly JsonEncodedText Pressure = JsonEncodedText.
Encode
("pressure");
16
private static readonly JsonEncodedText TiltX = JsonEncodedText.
Encode
("tiltX");
17
private static readonly JsonEncodedText TiltY = JsonEncodedText.
Encode
("tiltY");
18
private static readonly JsonEncodedText PointerType = JsonEncodedText.
Encode
("pointerType");
19
private static readonly JsonEncodedText IsPrimary = JsonEncodedText.
Encode
("isPrimary");
WebEventData\ProgressEventArgReader.cs (4)
12
private static readonly JsonEncodedText LengthComputable = JsonEncodedText.
Encode
("lengthComputable");
13
private static readonly JsonEncodedText Loaded = JsonEncodedText.
Encode
("loaded");
14
private static readonly JsonEncodedText Total = JsonEncodedText.
Encode
("total");
15
private static readonly JsonEncodedText Type = JsonEncodedText.
Encode
("type");
WebEventData\TouchEventArgsReader.cs (16)
12
private static readonly JsonEncodedText Detail = JsonEncodedText.
Encode
("detail");
13
private static readonly JsonEncodedText ClientX = JsonEncodedText.
Encode
("clientX");
14
private static readonly JsonEncodedText ClientY = JsonEncodedText.
Encode
("clientY");
15
private static readonly JsonEncodedText PageX = JsonEncodedText.
Encode
("pageX");
16
private static readonly JsonEncodedText PageY = JsonEncodedText.
Encode
("pageY");
17
private static readonly JsonEncodedText ScreenX = JsonEncodedText.
Encode
("screenX");
18
private static readonly JsonEncodedText ScreenY = JsonEncodedText.
Encode
("screenY");
19
private static readonly JsonEncodedText CtrlKey = JsonEncodedText.
Encode
("ctrlKey");
20
private static readonly JsonEncodedText ShiftKey = JsonEncodedText.
Encode
("shiftKey");
21
private static readonly JsonEncodedText AltKey = JsonEncodedText.
Encode
("altKey");
22
private static readonly JsonEncodedText MetaKey = JsonEncodedText.
Encode
("metaKey");
23
private static readonly JsonEncodedText Type = JsonEncodedText.
Encode
("type");
24
private static readonly JsonEncodedText Identifier = JsonEncodedText.
Encode
("identifier");
25
private static readonly JsonEncodedText ChangedTouches = JsonEncodedText.
Encode
("changedTouches");
26
private static readonly JsonEncodedText TargetTouches = JsonEncodedText.
Encode
("targetTouches");
27
private static readonly JsonEncodedText Touches = JsonEncodedText.
Encode
("touches");
WebEventData\WebEventDescriptorReader.cs (5)
13
private static readonly JsonEncodedText EventHandlerIdKey = JsonEncodedText.
Encode
("eventHandlerId");
14
private static readonly JsonEncodedText EventNameKey = JsonEncodedText.
Encode
("eventName");
15
private static readonly JsonEncodedText EventFieldInfoKey = JsonEncodedText.
Encode
("eventFieldInfo");
16
private static readonly JsonEncodedText ComponentIdKey = JsonEncodedText.
Encode
("componentId");
17
private static readonly JsonEncodedText FieldValueKey = JsonEncodedText.
Encode
("fieldValue");
WebEventData\WheelEventArgsReader.cs (4)
12
private static readonly JsonEncodedText DeltaX = JsonEncodedText.
Encode
("deltaX");
13
private static readonly JsonEncodedText DeltaY = JsonEncodedText.
Encode
("deltaY");
14
private static readonly JsonEncodedText DeltaZ = JsonEncodedText.
Encode
("deltaZ");
15
private static readonly JsonEncodedText DeltaMode = JsonEncodedText.
Encode
("deltaMode");
Microsoft.AspNetCore.Components.WebAssembly (1)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (1)
11
private static readonly JsonEncodedText IdProperty = JsonEncodedText.
Encode
("__internalId");
Microsoft.AspNetCore.Components.WebView (1)
src\Components\Shared\src\ElementReferenceJsonConverter.cs (1)
11
private static readonly JsonEncodedText IdProperty = JsonEncodedText.
Encode
("__internalId");
Microsoft.AspNetCore.Http.Abstractions.Tests (5)
ProblemDetailsJsonConverterTest.cs (5)
175
var expected = $"{{\"type\":\"{JsonEncodedText.
Encode
(value.Type)}\",\"title\":\"{value.Title}\",\"status\":{value.Status},\"detail\":\"{value.Detail}\",\"instance\":\"{JsonEncodedText.
Encode
(value.Instance)}\",\"traceId\":\"{traceId}\",\"some-data\":[\"value1\",\"value2\"]}}";
199
var expected = $"{{\"type\":\"{JsonEncodedText.
Encode
(value.Type)}\",\"title\":\"{value.Title}\",\"status\":{value.Status}}}";
230
var expected = $"{{\"type\":\"{JsonEncodedText.
Encode
(value.Type)}\",\"title\":\"{value.Title}\",\"status\":{value.Status},\"detail\":\"{value.Detail}\",\"instance\":\"{JsonEncodedText.
Encode
(value.Instance)}\",\"traceId\":null,\"some-data\":[\"value1\",\"value2\"]}}";
Microsoft.AspNetCore.Http.Connections.Common (10)
NegotiateProtocol.cs (10)
20
private static readonly JsonEncodedText ConnectionIdPropertyNameBytes = JsonEncodedText.
Encode
(ConnectionIdPropertyName);
22
private static readonly JsonEncodedText ConnectionTokenPropertyNameBytes = JsonEncodedText.
Encode
(ConnectionTokenPropertyName);
24
private static readonly JsonEncodedText UrlPropertyNameBytes = JsonEncodedText.
Encode
(UrlPropertyName);
26
private static readonly JsonEncodedText AccessTokenPropertyNameBytes = JsonEncodedText.
Encode
(AccessTokenPropertyName);
28
private static readonly JsonEncodedText AvailableTransportsPropertyNameBytes = JsonEncodedText.
Encode
(AvailableTransportsPropertyName);
30
private static readonly JsonEncodedText TransportPropertyNameBytes = JsonEncodedText.
Encode
(TransportPropertyName);
32
private static readonly JsonEncodedText TransferFormatsPropertyNameBytes = JsonEncodedText.
Encode
(TransferFormatsPropertyName);
34
private static readonly JsonEncodedText ErrorPropertyNameBytes = JsonEncodedText.
Encode
(ErrorPropertyName);
36
private static readonly JsonEncodedText NegotiateVersionPropertyNameBytes = JsonEncodedText.
Encode
(NegotiateVersionPropertyName);
38
private static readonly JsonEncodedText StatefulReconnectPropertyNameBytes = JsonEncodedText.
Encode
(StatefulReconnectPropertyName);
Microsoft.AspNetCore.SignalR.Common (4)
Protocol\HandshakeProtocol.cs (4)
21
private static readonly JsonEncodedText ProtocolPropertyNameBytes = JsonEncodedText.
Encode
(ProtocolPropertyName);
23
private static readonly JsonEncodedText ProtocolVersionPropertyNameBytes = JsonEncodedText.
Encode
(ProtocolVersionPropertyName);
25
private static readonly JsonEncodedText ErrorPropertyNameBytes = JsonEncodedText.
Encode
(ErrorPropertyName);
27
private static readonly JsonEncodedText TypePropertyNameBytes = JsonEncodedText.
Encode
(TypePropertyName);
Microsoft.AspNetCore.SignalR.Protocols.Json (11)
Protocol\JsonHubProtocol.cs (11)
27
private static readonly JsonEncodedText ResultPropertyNameBytes = JsonEncodedText.
Encode
(ResultPropertyName);
29
private static readonly JsonEncodedText ItemPropertyNameBytes = JsonEncodedText.
Encode
(ItemPropertyName);
31
private static readonly JsonEncodedText InvocationIdPropertyNameBytes = JsonEncodedText.
Encode
(InvocationIdPropertyName);
33
private static readonly JsonEncodedText StreamIdsPropertyNameBytes = JsonEncodedText.
Encode
(StreamIdsPropertyName);
35
private static readonly JsonEncodedText TypePropertyNameBytes = JsonEncodedText.
Encode
(TypePropertyName);
37
private static readonly JsonEncodedText ErrorPropertyNameBytes = JsonEncodedText.
Encode
(ErrorPropertyName);
39
private static readonly JsonEncodedText AllowReconnectPropertyNameBytes = JsonEncodedText.
Encode
(AllowReconnectPropertyName);
41
private static readonly JsonEncodedText TargetPropertyNameBytes = JsonEncodedText.
Encode
(TargetPropertyName);
43
private static readonly JsonEncodedText ArgumentsPropertyNameBytes = JsonEncodedText.
Encode
(ArgumentsPropertyName);
45
private static readonly JsonEncodedText HeadersPropertyNameBytes = JsonEncodedText.
Encode
(HeadersPropertyName);
47
private static readonly JsonEncodedText SequenceIdPropertyNameBytes = JsonEncodedText.
Encode
(SequenceIdPropertyName);
Microsoft.JSInterop (5)
Implementation\JSObjectReferenceJsonWorker.cs (1)
16
internal static readonly JsonEncodedText JSObjectIdKey = JsonEncodedText.
Encode
("__jsObjectId");
Infrastructure\ByteArrayJsonConverter.cs (1)
14
internal static readonly JsonEncodedText ByteArrayRefKey = JsonEncodedText.
Encode
("__byte[]");
Infrastructure\DotNetDispatcher.cs (1)
27
internal static readonly JsonEncodedText DotNetObjectRefKey = JsonEncodedText.
Encode
("__dotNetObject");
Infrastructure\DotNetStreamReferenceJsonConverter.cs (1)
11
private static readonly JsonEncodedText DotNetStreamRefKey = JsonEncodedText.
Encode
("__dotNetStream");
Infrastructure\JSStreamReferenceJsonConverter.cs (1)
12
private static readonly JsonEncodedText _jsStreamReferenceLengthKey = JsonEncodedText.
Encode
("__jsStreamReferenceLength");
System.Text.Json (7)
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (2)
151
formatted = JsonEncodedText.
Encode
(stringValue, options.Encoder);
212
formatted = JsonEncodedText.
Encode
(stringValue, options.Encoder);
System\Text\Json\Serialization\JsonSerializer.Write.HandleMetadata.cs (4)
12
internal static readonly JsonEncodedText s_metadataId = JsonEncodedText.
Encode
(IdPropertyName, encoder: null);
13
internal static readonly JsonEncodedText s_metadataRef = JsonEncodedText.
Encode
(RefPropertyName, encoder: null);
14
internal static readonly JsonEncodedText s_metadataType = JsonEncodedText.
Encode
(TypePropertyName, encoder: null);
15
internal static readonly JsonEncodedText s_metadataValues = JsonEncodedText.
Encode
(ValuesPropertyName, encoder: null);
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
92
CustomTypeDiscriminatorPropertyNameJsonEncoded = JsonEncodedText.
Encode
(propertyName, options.Encoder);