문서정보 : 2023.06.12.~08.10. 작성, 작성자 @SAgiKPJH
PowerShell 활용한 WPF MVVM PBM Reader
- 1. 프로젝트 구성
- 2. 기능 구성
- 3. 기능 설계
- 4. 기능 구현
- WPF 프로젝트 (.NET Framework) (v4.7)
- ReferenceList.txt : 참조 리스트 기록
- Common : 공통되는 폴더
- Static : 공유 폴더
- Model
- ViewModel
- View
- 단위 테스트 프로젝트 (.NET Framework) (v4.7)
- ReferenceList.txt : 참조 리스트 기록
- 프로젝트와 동일한 폴더 및 파일 구조
- Powershell 명령어 입력
- PowerShell 입력 결과 출력
- 특정한 명령어
- 주기적인 명령 결과 출력
- 표를 통한 시각화
- 결과 데이터 분리
- 편리 기능 추가
- 이전에 입력한 내용 바로 붙여넣기 가능
- 이전에 셋팅한 Layout 저장 기능
- 빠르게 단축키로 설정 가능 기능
- Powershell 특정 명령어 입력 기능 (코드)
- Powershell 특정 명령어 입력 기능 (UI)
- Powershell 명령 결과 반환 기능 (코드)
- Powershell 명령 결과 반환 기능 (UI)
- 주기적인 명령어 반환 기능 (코드)
- 주기적인 명령어 반환 기능 (UI)
- 반환 된 명령어 분석 기능 (코드)
- 명령어 표를 통한 출력 기능 (UI)
- 편리기능
- Powershell와의 연동 가능 기능
- 명령어 분석 기능
- 표 출력 기능
- 편리 기능
- Powershell와의 연동 가능 기능 : PowerShellHandeling.cs
- Powershell 명령어 입력 기능 : EnterCommand(string command);
- PowerShell 명령어 반환 기능 : List EnterCommand(string command);
- PowerShell 명령어 주기적 반환 기능 : List EnterCommand(string command, TimeSpan repeatTime);
- 명령어 분석 기능 : TextAnalysis.cs
- 명령어 분리 기능 : AnalysisReturnString(string returnString);
- 명령어들 분리 기능 : List AnalysisReturnListString(List returnListSting);
- powershell에서
pbm 127.0.0.1:9100 cluster show
명령어를 통해 cluster 상태를 획득할 수 있다는 점을 이용 - 나타난 cmd 결과를 가공해 Grid 형태로 출력할 수 있도록 구성
- DevExpress를 활용해 Grid를 구현
- Thread를 활용하여 PowerShell 구동
- 종료할 때 까지 생각하여 프로그램 리소스 분배
- 쉬운 유지보수를 위해 MVVM 패턴 활용
- 코드의 품질 향상을 위해 xUnit Test적용