diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-03-22 00:04:44 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-03-22 00:04:44 +0200 |
| commit | d48b2d23515d06a21ad241380986bf8f31773195 (patch) | |
| tree | ebbb6b2bc874773ec58a4c999a1f6eb61a572592 /Software/Visual_Studio/Tango.Transport | |
| parent | 8c094ceeaa538fdb5dc1d69b6ac73f8574cecb66 (diff) | |
| download | Tango-d48b2d23515d06a21ad241380986bf8f31773195.tar.gz Tango-d48b2d23515d06a21ad241380986bf8f31773195.zip | |
Implemented WebRtcTransportAdapter.
Implemented FileSystem via WebRTC.
Improved FileSystemControl keyboard control.
Implemented FileSystemControl context menu.
Improved Transported custom request handler registration.
Implemented FS copy/move/delete.
Implemented InputBox.
Diffstat (limited to 'Software/Visual_Studio/Tango.Transport')
| -rw-r--r-- | Software/Visual_Studio/Tango.Transport/ITransporter.cs | 2 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.Transport/TransporterBase.cs | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Software/Visual_Studio/Tango.Transport/ITransporter.cs b/Software/Visual_Studio/Tango.Transport/ITransporter.cs index af80f6b1e..1187b2684 100644 --- a/Software/Visual_Studio/Tango.Transport/ITransporter.cs +++ b/Software/Visual_Studio/Tango.Transport/ITransporter.cs @@ -13,7 +13,7 @@ using System.Collections.ObjectModel; namespace Tango.Transport { - public delegate void RequestHandlerCallbackDelegate<Request>(Request request, String token); + public delegate void RequestHandlerCallbackDelegate<Request>(ITransporter transporter, Request request, String token); /// <summary> /// Represents a transportation engine which can send and receive <see cref="TangoMessage{T}"/> message using a <see cref="ITransportAdapter">Transport adapter</see>. diff --git a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs index 3672baf63..11ce20b0a 100644 --- a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs +++ b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs @@ -37,7 +37,7 @@ namespace Tango.Transport private class RequestHandler { public Type RequestType { get; set; } - public Action<Object, String> Callback { get; set; } + public Action<ITransporter, Object, String> Callback { get; set; } } private const int MESSAGE_TOKEN_LENGTH = 36; @@ -316,7 +316,7 @@ namespace Tango.Transport { try { - handler.Callback.Invoke(request, container.Token); + handler.Callback.Invoke(this, request, container.Token); } catch { @@ -339,7 +339,7 @@ namespace Tango.Transport { try { - handler.Callback.Invoke(innerRequest, container.Token); + handler.Callback.Invoke(this, innerRequest, container.Token); } catch { @@ -1216,9 +1216,9 @@ namespace Tango.Transport { RequestHandler handler = new RequestHandler(); handler.RequestType = typeof(Request); - handler.Callback = (obj, token) => + handler.Callback = (transporter, obj, token) => { - callback?.Invoke(obj as Request, token); + callback?.Invoke(transporter, obj as Request, token); }; _requestHandlers.Add(handler); |
