Beispiel #1
0
        private static int RunHandler(CommandOptions options)
        {
            IHandler handler = null;

            var testOptions = options as TestSignalOptions;

            if (testOptions != null)
            {
                handler = new TestSignalHandler(testOptions);
            }

            var devicesOptions = options as GetDevicesOptions;

            if (devicesOptions != null)
            {
                handler = new GetDevicesHandler(devicesOptions);
            }

            if (handler == null)
            {
                throw new NotSupportedException();
            }

            return(handler.Run());
        }
 public CodeGenerationForm(GetDevicesHandler devices, Hashtable stackSettings)
 {
     InitializeComponent();
     this.Settings = stackSettings;
     this.GetDevices = devices;
 }