Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        public static DTO.Session <T> ToDto <T>(this Display.Session <T> displayEntity) where T : class
        {
            var dto = new DTO.Session <T>();

            //dto.User = displayEntity.User.ToDto();
            //dto.Data = displayEntity.Data as T;
            //dto.AppOnline = displayEntity.AppOnline;
            //dto.Authenticated = displayEntity.Authenticated;
            //dto.SqlAuthorization = displayEntity.SqlAuthorization;
            //dto.WinAuthorization = displayEntity.WinAuthorization;
            //dto.SessionOk = displayEntity.SessionOk;
            //dto.ClientMessage = displayEntity.ClientMessage;
            //dto.ServerMessage = displayEntity.ServerMessage;
            //dto.Modules = displayEntity.Modules.ToDTOs();		    //BMB - Change based on changeset #289 (Change Feature to List of Features (Entity.Session))

            return(dto);
        }
Ejemplo n.º 3
0
        public static DTO.Session <T> ToDto <T>(this Display.Session <T> displayEntity) where T : class
        {
            var dto = new DTO.Session <T>();

            dto.User             = displayEntity.User.ToDto();
            dto.Data             = displayEntity.Data as T;
            dto.AppOnline        = displayEntity.AppOnline;
            dto.Authenticated    = displayEntity.Authenticated;
            dto.SqlAuthorization = displayEntity.SqlAuthorization;
            dto.WinAuthorization = displayEntity.WinAuthorization;
            dto.SessionOk        = displayEntity.SessionOk;
            dto.ClientMessage    = displayEntity.ClientMessage;
            dto.ServerMessage    = displayEntity.ServerMessage;
            dto.Modules          = displayEntity.Modules.ToDTOs();

            return(dto);
        }
Ejemplo n.º 4
0
        public static Display.Session <T> ToDisplayEntity <T>(this DTO.Session <T> dto) where T : class
        {
            var displayEntity = new Display.Session <T>();

            displayEntity.User             = dto.User.ToDisplayEntity();
            displayEntity.Data             = dto.Data as T;
            displayEntity.AppOnline        = dto.AppOnline;
            displayEntity.Authenticated    = dto.Authenticated;
            displayEntity.SqlAuthorization = dto.SqlAuthorization;
            displayEntity.WinAuthorization = dto.WinAuthorization;
            displayEntity.SessionOk        = dto.SessionOk;
            displayEntity.ClientCommand    = dto.ClientCommand;
            displayEntity.ClientMessage    = dto.ClientMessage;
            displayEntity.ServerMessage    = dto.ServerMessage;
            displayEntity.Modules          = dto.Modules.ToDisplayEntities();

            return(displayEntity);
        }