public RawUIStateInputReport(
            PresentationSource inputSource,
            InputMode mode,
            int timestamp,
            RawUIStateActions action,
            RawUIStateTargets targets) : base(inputSource, InputType.Keyboard, mode, timestamp)
        {
            if (!IsValidRawUIStateAction(action))
                throw new System.ComponentModel.InvalidEnumArgumentException("action", (int)action, typeof(RawUIStateActions));
            if (!IsValidRawUIStateTargets(targets))
                throw new System.ComponentModel.InvalidEnumArgumentException("targets", (int)targets, typeof(RawUIStateTargets));

            _action = action;
            _targets = targets;
        }
        public RawUIStateInputReport(
            PresentationSource inputSource,
            InputMode mode,
            int timestamp,
            RawUIStateActions action,
            RawUIStateTargets targets) : base(inputSource, InputType.Keyboard, mode, timestamp)
        {
            if (!IsValidRawUIStateAction(action))
            {
                throw new System.ComponentModel.InvalidEnumArgumentException("action", (int)action, typeof(RawUIStateActions));
            }
            if (!IsValidRawUIStateTargets(targets))
            {
                throw new System.ComponentModel.InvalidEnumArgumentException("targets", (int)targets, typeof(RawUIStateTargets));
            }

            _action  = action;
            _targets = targets;
        }
 // IsValid Method for RawUIStateActions.
 internal static bool IsValidRawUIStateAction(RawUIStateActions action)
 {
     return(action == RawUIStateActions.Set ||
            action == RawUIStateActions.Clear ||
            action == RawUIStateActions.Initialize);
 }
 // IsValid Method for RawUIStateActions.
 internal static bool IsValidRawUIStateAction(RawUIStateActions action)
 {
     return (action == RawUIStateActions.Set ||
             action == RawUIStateActions.Clear ||
             action == RawUIStateActions.Initialize);
 }