/// <summary>
        /// Maps a Session DTO to a Session display entity of type NullT with minimal set of display properties.
        /// </summary>
        public static Display.Session <DTO.NullT> ToDisplaySession <T>(this DTO.Session <T> dto) where T : class
        {
            Display.Session <DTO.NullT> displayEntity = new Display.Session <DTO.NullT>();
            displayEntity.SessionOk     = dto.SessionOk;
            displayEntity.ClientCommand = dto.ClientCommand;
            displayEntity.ClientMessage = dto.ClientMessage;
            displayEntity.ServerMessage = dto.ServerMessage;

            return(displayEntity);
        }
Exemple #2
0
        protected ViewModelBase()
        {
            Commands           = new List <DisplayEntities.Action>();
            SessionDiagnostics = new Display.Session <DTO.NullT>();

            //TODO: pass in IMessageDisplayService provider via a constructor parameter and resolve using dependency injection.
            //The following is for initial development only:
            _messageDisplayService = new APLPX.UI.WPF.ApplicationServices.WpfMessageDisplayService();

#if DEBUG
            IsDebugMode = true;
#endif
        }