Commits

Christian Specht  committed 7cee70f Draft

new property in CommandCenter to display the name of the missile launcher model

  • Participants
  • Parent commits fd8b67c

Comments (0)

Files changed (4)

File src/MissileSharp/CommandCenter.cs

         }
 
         /// <summary>
+        /// The name of the device
+        /// </summary>
+        public string LauncherModelName
+        {
+            get
+            {
+                return this.launcher.ModelName;
+            }
+        }
+
+        /// <summary>
         /// The device is ready to receive commands
         /// </summary>
         public bool IsReady

File src/MissileSharp/ICommandCenter.cs

         bool IsReady { get; }
 
         /// <summary>
+        /// The name of the device
+        /// </summary>
+        string LauncherModelName { get; }
+
+        /// <summary>
         /// Runs a LauncherCommand
         /// </summary>
         /// <param name="command">The command to run</param>

File src/MissileSharp/ILauncherModel.cs

     public interface ILauncherModel
     {
         /// <summary>
+        /// Name of the device (human readable)
+        /// </summary>
+        string ModelName { get; }
+
+        /// <summary>
         /// VendorId of the device
         /// </summary>
         int VendorId { get; }

File src/MissileSharp/ThunderMissileLauncher.cs

     #pragma warning disable 1591
     public class ThunderMissileLauncher : ILauncherModel
     {
+        public string ModelName
+        {
+            get { return "Dream Cheeky Thunder Missile Launcher"; }
+        }
+
         public int VendorId
         {
             get { return 0x2123; }