Ejemplo n.º 1
0
        /// <summary>
        /// Try to return a ThreadRelayCommand. If it doesn't exists, create it using the Command param and then return it.
        /// </summary>
        /// <param name="Command">The command to be created/returned</param>
        /// <param name="Name">The name of the ThreadRelayCommand</param>
        /// <returns>Returns the ThreadRelayCommand</returns>
        protected Threading.ThreadRelayCommand GetCommand(Threading.ThreadRelayCommand Command, [System.Runtime.CompilerServices.CallerMemberName] string Name = null)
        {
begin:
            if (_Commands.TryGetValue(Name, out ICommand cmd))
            {
                return(cmd as Threading.ThreadRelayCommand);
            }
            else
            {
                _Commands.Add(Name, Command);
                goto begin;
            }
        }
Ejemplo n.º 2
0
 internal ThreadRelayCommandExecuteEventArgs(ThreadRelayCommand Parent, object param)
 {
     _Parent    = Parent;
     _Parameter = param;
 }