aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/ExtensionMethods/IExternalBridgeClientExtensions.cs
blob: 3e9546983020bd0e6bb31ee89f5e93fdf4e0214b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Integration.ExternalBridge;

/// <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;
    }
}
/span> /// Represents a PPC <see cref="PowerModule"/>. /// </summary> /// <seealso cref="Tango.PPC.Common.PPCModuleBase" /> [PPCModule(100, DockToBottom = true)] public class PowerModule : PPCModuleBase { /// <summary> /// Gets the module name. /// </summary> public override string Name { get { return "Power"; } } /// <summary> /// Gets the module description. /// </summary> public override string Description { get { return "Tango Power Module"; } } /// <summary> /// Gets the module cover image. /// </summary> public override BitmapSource Image { get { return ResourceHelper.GetImageFromResources("Images/power-module.png"); } } /// <summary> /// Gets the module entry point view type. /// </summary> public override Type MainViewType { get { return typeof(MainView); } } /// <summary> /// Gets the permission required to see and load this module. /// </summary> public override Permissions Permission { get { return Permissions.RunPPC; } } /// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public override void Dispose() { //Dispose module here... } } }