6 instantiations of Message
NuGet.Protocol (6)
Plugins\InboundRequestContext.cs (1)
185
var response = new
Message
(
Plugins\MessageConverter.cs (1)
167
return new
Message
(requestId, messageType, messageMethod, payload);
Plugins\MessageDispatcher.cs (2)
426
message = new
Message
(requestId, MessageType.Fault, MessageMethod.None, fault);
432
message = new
Message
(request.RequestId, MessageType.Fault, request.Method, fault);
Plugins\MessageUtilities.cs (2)
35
return new
Message
(requestId, type, method, (object)null);
67
return new
Message
(requestId, type, method, payload);
103 references to Message
NuGet.Protocol (103)
_generated\72\PluginJsonContext.Message.g.cs (9)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.Plugins.
Message
>? _Message;
19
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.Plugins.
Message
> Message
22
get => _Message ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.Plugins.
Message
>)Options.GetTypeInfo(typeof(global::NuGet.Protocol.Plugins.
Message
));
25
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.Plugins.
Message
> Create_Message(global::System.Text.Json.JsonSerializerOptions options)
27
if (!TryGetTypeInfoForRuntimeCustomConverter<global::NuGet.Protocol.Plugins.
Message
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Protocol.Plugins.
Message
> jsonTypeInfo))
29
global::System.Text.Json.Serialization.JsonConverter converter = ExpandConverter(typeof(global::NuGet.Protocol.Plugins.
Message
), new global::NuGet.Protocol.Plugins.MessageConverter(), options);
30
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<global::NuGet.Protocol.Plugins.
Message
> (options, converter);
_generated\95\PluginJsonContext.GetJsonTypeInfo.g.cs (1)
138
if (type == typeof(global::NuGet.Protocol.Plugins.
Message
))
Plugins\AutomaticProgressReporter.cs (4)
21
private readonly
Message
_request;
27
Message
request,
116
Message
request,
177
var
progress = MessageUtilities.Create(
Plugins\Connection.cs (1)
227
public async Task SendAsync(
Message
message, CancellationToken cancellationToken)
Plugins\IConnection.cs (1)
59
Task SendAsync(
Message
message, CancellationToken cancellationToken);
Plugins\IMessageDispatcher.cs (6)
35
Message
CreateMessage(MessageType type, MessageMethod method);
45
Message
CreateMessage<TPayload>(MessageType type, MessageMethod method, TPayload payload)
54
Task DispatchCancelAsync(
Message
request, CancellationToken cancellationToken);
63
Task DispatchFaultAsync(
Message
request, Fault fault, CancellationToken cancellationToken);
72
Task DispatchProgressAsync(
Message
request, Progress progress, CancellationToken cancellationToken);
100
Task DispatchResponseAsync<TOutbound>(
Message
request, TOutbound responsePayload, CancellationToken cancellationToken)
Plugins\InboundRequestContext.cs (5)
103
private async Task ProcessResponseAsync(IRequestHandler requestHandler,
Message
request, IResponseHandler responseHandler)
120
var
response = MessageUtilities.Create(request.RequestId, MessageType.Cancel, request.Method);
173
public void BeginFaultAsync(
Message
request, Exception exception)
185
var
response = new Message(
235
Message
request,
Plugins\IRequestHandler.cs (1)
39
Message
request,
Plugins\IResponseHandler.cs (1)
29
Task SendResponseAsync<TPayload>(
Message
request, TPayload payload, CancellationToken cancellationToken)
Plugins\ISender.cs (1)
42
Task SendAsync(
Message
message, CancellationToken cancellationToken);
Plugins\MessageConverter.cs (13)
12
internal sealed class MessageConverter : JsonConverter<
Message
>
103
public override
Message
Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
108
if (!root.TryGetProperty(nameof(
Message
.RequestId), out var requestIdProp))
110
throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_RequiredJsonPropertyMissing, nameof(
Message
.RequestId)));
116
throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.ArgumentCannotBeNullOrEmpty, nameof(
Message
.RequestId)));
119
if (!root.TryGetProperty(nameof(
Message
.Type), out var typeProp))
121
throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_RequiredJsonPropertyMissing, nameof(
Message
.Type)));
130
if (!root.TryGetProperty(nameof(
Message
.Method), out var methodProp))
132
throw new JsonException(string.Format(CultureInfo.CurrentCulture, Strings.Error_RequiredJsonPropertyMissing, nameof(
Message
.Method)));
170
public override void Write(Utf8JsonWriter writer,
Message
value, JsonSerializerOptions options)
173
writer.WriteString(nameof(
Message
.RequestId), value.RequestId);
174
writer.WriteString(nameof(
Message
.Type), value.Type.ToString());
175
writer.WriteString(nameof(
Message
.Method), value.Method.ToString());
Plugins\MessageDispatcher.cs (22)
142
public
Message
CreateMessage(MessageType type, MessageMethod method)
158
public
Message
CreateMessage<TPayload>(MessageType type, MessageMethod method, TPayload payload)
180
public Task DispatchCancelAsync(
Message
request, CancellationToken cancellationToken)
210
public Task DispatchFaultAsync(
Message
request, Fault fault, CancellationToken cancellationToken)
241
public Task DispatchProgressAsync(
Message
request, Progress progress, CancellationToken cancellationToken)
317
Message
request,
370
Message
request,
380
Message
request,
392
var
message = MessageUtilities.Create(request.RequestId, type, request.Method, payload);
406
Message
request,
409
var
message = MessageUtilities.Create(request.RequestId, MessageType.Cancel, request.Method);
416
Message
request,
420
Message
message;
440
Message
request,
444
var
message = MessageUtilities.Create(request.RequestId, MessageType.Progress, request.Method, progress);
451
Message
response,
468
var
message = CreateMessage(type, method, payload);
591
private void HandleInboundCancel(
Message
message)
601
private void HandleInboundFault(
Message
fault)
613
private void HandleInboundRequest(
Message
message)
690
Message
message,
702
Message
message,
Plugins\MessageEventArgs.cs (2)
18
public
Message
Message { get; }
25
public MessageEventArgs(
Message
message)
Plugins\Messages\Message.cs (1)
49
/// Initializes a new instance of the <see cref="
Message
" /> class.
Plugins\MessageUtilities.cs (9)
17
/// Instantiates a new <see cref="
Message
" /> class.
22
/// <returns>a <see cref="
Message
" /> instance.</returns>
25
public static
Message
Create(
39
/// Instantiates a new <see cref="
Message
" /> class.
46
/// <returns>a <see cref="
Message
" /> instance.</returns>
50
public static
Message
Create<TPayload>(
72
/// Use this instead of accessing the obsolete <see cref="
Message
.Payload" /> directly.
77
public static string SerializePayload(
Message
message)
110
public static TPayload DeserializePayload<TPayload>(
Message
message)
Plugins\OutboundRequestContext.cs (3)
47
public abstract void HandleProgress(
Message
progress);
54
public abstract void HandleResponse(
Message
response);
61
public abstract void HandleFault(
Message
fault);
Plugins\OutboundRequestContext`1.cs (6)
27
private readonly
Message
_request;
54
Message
request,
82
Message
request,
152
public override void HandleProgress(
Message
progress)
172
public override void HandleResponse(
Message
response)
189
public override void HandleFault(
Message
fault)
Plugins\PluginFactory.cs (1)
445
var
message = plugin.Connection.MessageDispatcher.CreateMessage(
Plugins\PluginJsonContext.cs (1)
11
[JsonSerializable(typeof(
Message
))]
Plugins\ProtocolErrorEventArgs.cs (2)
23
public
Message
Message { get; }
47
public ProtocolErrorEventArgs(Exception exception,
Message
message)
Plugins\Receiver.cs (2)
63
protected void FireFaultEvent(Exception exception,
Message
message)
72
protected void FireMessageReceivedEvent(
Message
message)
Plugins\RequestHandlers\CloseRequestHandler.cs (1)
64
Message
request,
Plugins\RequestHandlers\GetCredentialsRequestHandler.cs (1)
114
Message
request,
Plugins\RequestHandlers\GetServiceIndexRequestHandler.cs (1)
98
Message
request,
Plugins\RequestHandlers\LogRequestHandler.cs (1)
58
Message
request,
Plugins\RequestHandlers\MonitorNuGetProcessExitRequestHandler.cs (1)
74
Message
request,
Plugins\RequestHandlers\SymmetricHandshake.cs (1)
159
Message
request,
Plugins\Sender.cs (1)
122
public Task SendAsync(
Message
message, CancellationToken cancellationToken)
Plugins\StandardInputReceiver.cs (2)
114
Message
message = null;
137
message = JsonSerializationUtilities.Deserialize<
Message
>(line);
Plugins\StandardOutputReceiver.cs (2)
105
Message
message = null;
119
message = JsonSerializationUtilities.Deserialize<
Message
>(e.Line);