Dreamine.Web 1.0.0.0
WPF와 Blazor를 한 코드 흐름으로 연결하고 반복적인 MVVM 코드를 줄이는 오픈소스 FullKit 공식 웹 애플리케이션입니다.
로딩중...
검색중...
일치하는것 없음
DreamineWeb.Services.VersionSyncService 클래스 참조

더 자세히 ...

DreamineWeb.Services.VersionSyncService에 대한 협력 다이어그램:

Public 멤버 함수

 VersionSyncService (ILibraryStore store, DreamineOptions opts)
async Task< int > SyncAsync ()

속성

bool IsConfigured [get]

Private 속성

readonly ILibraryStore _store
readonly string _libRoot

정적 Private 속성

static readonly Regex _versionRx

상세한 설명

Version Sync Service 기능과 관련 상태를 캡슐화합니다.

VersionSyncService.cs 파일의 15 번째 라인에서 정의되었습니다.

생성자 & 소멸자 문서화

◆ VersionSyncService()

DreamineWeb.Services.VersionSyncService.VersionSyncService ( ILibraryStore store,
DreamineOptions opts )
inline

지정한 설정으로 VersionSyncService 클래스의 새 인스턴스를 초기화합니다.

매개변수
storestore에 사용할 ILibraryStore 값입니다.
optsopts에 사용할 DreamineOptions 값입니다.

VersionSyncService.cs 파일의 71 번째 라인에서 정의되었습니다.

72 {
73 _store = store;
74 _libRoot = opts.LibrarySourceRoot;
75 }

다음을 참조함 : _libRoot, _store, DreamineWeb.Models.DreamineOptions.LibrarySourceRoot.

멤버 함수 문서화

◆ SyncAsync()

async Task< int > DreamineWeb.Services.VersionSyncService.SyncAsync ( )
inline

Sync Async 작업을 수행합니다.

반환값
Sync Async 작업에서 생성한 Task<int> 결과입니다.

VersionSyncService.cs 파일의 103 번째 라인에서 정의되었습니다.

104 {
105 if (!IsConfigured) return -1;
106
107 // 어셈블리명 → 버전 매핑
108 var map = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
109 foreach (var f in Directory.EnumerateFiles(_libRoot, "*.csproj", SearchOption.AllDirectories))
110 {
111 var name = Path.GetFileNameWithoutExtension(f);
112 if (name.EndsWith(".Tests", StringComparison.OrdinalIgnoreCase)) continue;
113 var m = _versionRx.Match(await File.ReadAllTextAsync(f));
114 if (m.Success) map[name] = m.Groups[1].Value;
115 }
116
117 var libs = (await _store.GetAllAsync()).ToList();
118 int count = 0;
119 foreach (var lib in libs)
120 {
121 if (!map.TryGetValue(lib.Name, out var ver)) continue;
122 if (lib.Version == ver) continue;
123 lib.Version = ver;
124 await _store.SaveAsync(lib);
125 count++;
126 }
127 return count;
128 }

다음을 참조함 : _libRoot, _store, _versionRx, IsConfigured.

멤버 데이터 문서화

◆ _libRoot

readonly string DreamineWeb.Services.VersionSyncService._libRoot
private

lib Root 값을 보관합니다.

VersionSyncService.cs 파일의 34 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SyncAsync(), VersionSyncService().

◆ _store

readonly ILibraryStore DreamineWeb.Services.VersionSyncService._store
private

store 값을 보관합니다.

VersionSyncService.cs 파일의 25 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SyncAsync(), VersionSyncService().

◆ _versionRx

readonly Regex DreamineWeb.Services.VersionSyncService._versionRx
staticprivate
초기값:
=
new(@"<Version>\s*([^<\s]+)\s*</Version>", RegexOptions.IgnoreCase | RegexOptions.Compiled)

version Rx 값을 보관합니다.

VersionSyncService.cs 파일의 44 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SyncAsync().

속성 문서화

◆ IsConfigured

bool DreamineWeb.Services.VersionSyncService.IsConfigured
get

Is Configured 값을 가져옵니다.

VersionSyncService.cs 파일의 85 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : SyncAsync().


이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: