diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-08 18:19:37 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-08 18:19:37 +0200 |
| commit | 3aa8d26fe59aeea616bda89ca325b9f9583fadc6 (patch) | |
| tree | 064470fd7ba7d2186b257544a3d1675dc7f21b64 /Software/Visual_Studio/Tango.Integration/ExtensionMethods | |
| parent | f95e70a118ed238bbdeea5b44c9be7e6cfb0b89c (diff) | |
| download | Tango-3aa8d26fe59aeea616bda89ca325b9f9583fadc6.tar.gz Tango-3aa8d26fe59aeea616bda89ca325b9f9583fadc6.zip | |
Added code comments for:
Integration.
Refactored ExternalBridgeClient to:
IExternalBridgeSecureClient.
ExternalBridgeTcpClient.
ExternalBridgeUsbClient.
Refactored MachineConnectionView to use the new external bridge clients by data template "data type".
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/ExtensionMethods')
| -rw-r--r-- | Software/Visual_Studio/Tango.Integration/ExtensionMethods/IExternalBridgeClientExtensions.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/ExtensionMethods/IExternalBridgeClientExtensions.cs b/Software/Visual_Studio/Tango.Integration/ExtensionMethods/IExternalBridgeClientExtensions.cs new file mode 100644 index 000000000..62a7c1523 --- /dev/null +++ b/Software/Visual_Studio/Tango.Integration/ExtensionMethods/IExternalBridgeClientExtensions.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Integration.Services; + +/// <summary> +/// Contains <see cref="IExternalBridgeClient"/> extension methods. +/// </summary> +public static class IExternalBridgeClientExtensions +{ + /// <summary> + /// Casts the external bridge client to the specified type T. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="client">The client.</param> + /// <returns></returns> + public static T As<T>(this IExternalBridgeClient client) where T : IExternalBridgeClient + { + return (T)client; + } +} |
