Portfolio.Web 1.0.0.0
.NET, Blazor, WPF와 서비스 운영 경험을 프로젝트·이력·기술 스택 단위로 보여주는 개발자 포트폴리오입니다.
로딩중...
검색중...
일치하는것 없음
PortfolioApp.ViewModels.PortfolioPublicViewModel 클래스 참조

더 자세히 ...

PortfolioApp.ViewModels.PortfolioPublicViewModel에 대한 협력 다이어그램:

Public 멤버 함수

 PortfolioPublicViewModel (IPortfolioTenantStore tenants, IProjectStore projects, IResumeStore resumes, IContactStore contacts, IMediaService media)
async Task LoadAsync (string slug)
string GetMediaUrl (string slug, string projectId, string fileName)
string GetImageUrl (string slug, string projectId, string fileName)
string GetVideoUrl (string slug, string projectId, string fileName)
string GetProfileImageUrl (string slug, string fileName)
async Task< bool > SendContactAsync (string slug)

정적 Public 멤버 함수

static bool IsYouTube (string url)
static string GetYouTubeEmbedUrl (string url)

속성

PortfolioConfigConfig [get, private set]
List< ProjectItemProjects = [] [get, private set]
ResumeInfo Resume = new() [get, private set]
bool HasLoaded [get, private set]
string StatusMessage = "" [get, set]
string ContactName = "" [get, set]
string ContactEmail = "" [get, set]
string ContactMessage = "" [get, set]
string Query = "" [get, set]
string SelectedTag = "" [get, set]
string SelectedCategory = "" [get, set]
List< ProjectItemPersonal [get]
List< ProjectItemWork [get]
List< ProjectItemPublic [get]
IEnumerable< string > AllTags [get]
List< ProjectItemFilteredProjects [get]

정적 Private 멤버 함수

static bool IsExternalUrl (string url)

Private 속성

readonly IPortfolioTenantStore _tenants
readonly IProjectStore _projects
readonly IResumeStore _resumes
readonly IContactStore _contacts
readonly IMediaService _media

상세한 설명

Portfolio Public View Model 기능과 관련 상태를 캡슐화합니다.

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

생성자 & 소멸자 문서화

◆ PortfolioPublicViewModel()

PortfolioApp.ViewModels.PortfolioPublicViewModel.PortfolioPublicViewModel ( IPortfolioTenantStore tenants,
IProjectStore projects,
IResumeStore resumes,
IContactStore contacts,
IMediaService media )
inline

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

매개변수
tenantstenants에 사용할 IPortfolioTenantStore 값입니다.
projectsprojects에 사용할 IProjectStore 값입니다.
resumesresumes에 사용할 IResumeStore 값입니다.
contactscontacts에 사용할 IContactStore 값입니다.
mediamedia에 사용할 IMediaService 값입니다.

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

290 {
291 _tenants = tenants;
292 _projects = projects;
293 _resumes = resumes;
294 _contacts = contacts;
295 _media = media;
296 }

다음을 참조함 : _contacts, _media, _projects, _resumes, _tenants.

멤버 함수 문서화

◆ GetImageUrl()

string PortfolioApp.ViewModels.PortfolioPublicViewModel.GetImageUrl ( string slug,
string projectId,
string fileName )
inline

Image Url 값을 가져옵니다.

매개변수
slugslug에 사용할 string 값입니다.
projectIdproject Id에 사용할 string 값입니다.
fileNamefile Name에 사용할 string 값입니다.
반환값
Get Image Url 작업에서 생성한 string 결과입니다.

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

429 =>
430 IsExternalUrl(fileName) ? fileName : _media.GetMediaUrl(slug, projectId, fileName);

다음을 참조함 : _media.

◆ GetMediaUrl()

string PortfolioApp.ViewModels.PortfolioPublicViewModel.GetMediaUrl ( string slug,
string projectId,
string fileName )
inline

Media Url 값을 가져옵니다.

매개변수
slugslug에 사용할 string 값입니다.
projectIdproject Id에 사용할 string 값입니다.
fileNamefile Name에 사용할 string 값입니다.
반환값
Get Media Url 작업에서 생성한 string 결과입니다.

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

386 =>
387 _media.GetMediaUrl(slug, projectId, fileName);

다음을 참조함 : _media.

◆ GetProfileImageUrl()

string PortfolioApp.ViewModels.PortfolioPublicViewModel.GetProfileImageUrl ( string slug,
string fileName )
inline

Profile Image Url 값을 가져옵니다.

매개변수
slugslug에 사용할 string 값입니다.
fileNamefile Name에 사용할 string 값입니다.
반환값
Get Profile Image Url 작업에서 생성한 string 결과입니다.

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

596 =>
597 _media.GetProfileImageUrl(slug, fileName);

다음을 참조함 : _media.

◆ GetVideoUrl()

string PortfolioApp.ViewModels.PortfolioPublicViewModel.GetVideoUrl ( string slug,
string projectId,
string fileName )
inline

Video Url 값을 가져옵니다.

매개변수
slugslug에 사용할 string 값입니다.
projectIdproject Id에 사용할 string 값입니다.
fileNamefile Name에 사용할 string 값입니다.
반환값
Get Video Url 작업에서 생성한 string 결과입니다.

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

472 =>
473 IsExternalUrl(fileName) ? fileName : _media.GetMediaUrl(slug, projectId, fileName);

다음을 참조함 : _media.

◆ GetYouTubeEmbedUrl()

string PortfolioApp.ViewModels.PortfolioPublicViewModel.GetYouTubeEmbedUrl ( string url)
inlinestatic

You Tube Embed Url 값을 가져옵니다.

매개변수
urlurl에 사용할 string 값입니다.
반환값
Get You Tube Embed Url 작업에서 생성한 string 결과입니다.

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

527 {
528 // youtu.be/ID 또는 youtube.com/watch?v=ID → /embed/ID
529 var id = "";
530 if (url.Contains("youtu.be/"))
531 id = url.Split("youtu.be/")[1].Split('?')[0].Split('&')[0];
532 else if (url.Contains("v="))
533 id = url.Split("v=")[1].Split('&')[0].Split('?')[0];
534 return string.IsNullOrWhiteSpace(id) ? url : $"https://www.youtube.com/embed/{id}";
535 }

◆ IsExternalUrl()

bool PortfolioApp.ViewModels.PortfolioPublicViewModel.IsExternalUrl ( string url)
inlinestaticprivate

Is External Url 조건을 확인합니다.

매개변수
urlurl에 사용할 string 값입니다.
반환값
Is External Url 조건이 충족되면 true이고, 그렇지 않으면 false입니다.

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

561 =>
562 url.StartsWith('/') || url.StartsWith("http://") || url.StartsWith("https://");

◆ IsYouTube()

bool PortfolioApp.ViewModels.PortfolioPublicViewModel.IsYouTube ( string url)
inlinestatic

Is You Tube 조건을 확인합니다.

매개변수
urlurl에 사용할 string 값입니다.
반환값
Is You Tube 조건이 충족되면 true이고, 그렇지 않으면 false입니다.

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

499 =>
500 url.Contains("youtube.com") || url.Contains("youtu.be");

◆ LoadAsync()

async Task PortfolioApp.ViewModels.PortfolioPublicViewModel.LoadAsync ( string slug)
inline

Async 데이터를 불러옵니다.

매개변수
slugslug에 사용할 string 값입니다.
반환값
Load Async 작업에서 생성한 Task 결과입니다.

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

323 {
324 HasLoaded = false;
325 Config = null;
326 Projects = [];
327 Resume = new();
328
329 Config = await _tenants.GetAsync(slug);
330 if (Config == null)
331 {
332 HasLoaded = true;
333 return;
334 }
335
336 Projects = await _projects.GetAllAsync(slug);
337 Resume = await _resumes.GetAsync(slug);
338 // 기존 데이터 마이그레이션: ImageFileName → WorkImages (표시 전용, 저장 안 함)
339 foreach (var p in Projects.Where(p =>
340 !string.IsNullOrWhiteSpace(p.ImageFileName) && p.WorkImages.Length == 0))
341 p.WorkImages = [p.ImageFileName!];
342
343 HasLoaded = true;
344 }

다음을 참조함 : _projects, _resumes, _tenants, Config, HasLoaded, Projects, Resume.

◆ SendContactAsync()

async Task< bool > PortfolioApp.ViewModels.PortfolioPublicViewModel.SendContactAsync ( string slug)
inline

Send Contact Async 작업을 수행합니다.

매개변수
slugslug에 사용할 string 값입니다.
반환값
Send Contact Async 작업에서 생성한 Task<bool> 결과입니다.

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

624 {
625 StatusMessage = "";
626 if (string.IsNullOrWhiteSpace(ContactName)) { StatusMessage = "❌ 이름을 입력하세요."; return false; }
627 if (string.IsNullOrWhiteSpace(ContactMessage)) { StatusMessage = "❌ 메시지를 입력하세요."; return false; }
628
629 var msg = new ContactMessage
630 {
631 SenderName = ContactName.Trim(),
632 Email = ContactEmail.Trim(),
633 Message = ContactMessage.Trim(),
634 SentAt = DateTime.Now,
635 };
636 await _contacts.SaveAsync(slug, msg);
637 ContactName = ContactEmail = ContactMessage = "";
638 StatusMessage = "✅ 메시지가 전송되었습니다.";
639 return true;
640 }

다음을 참조함 : _contacts, ContactEmail, ContactMessage, ContactName, StatusMessage.

멤버 데이터 문서화

◆ _contacts

readonly IContactStore PortfolioApp.ViewModels.PortfolioPublicViewModel._contacts
private

contacts 값을 보관합니다.

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

다음에 의해서 참조됨 : PortfolioPublicViewModel(), SendContactAsync().

◆ _media

readonly IMediaService PortfolioApp.ViewModels.PortfolioPublicViewModel._media
private

media 값을 보관합니다.

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

다음에 의해서 참조됨 : GetImageUrl(), GetMediaUrl(), GetProfileImageUrl(), GetVideoUrl(), PortfolioPublicViewModel().

◆ _projects

readonly IProjectStore PortfolioApp.ViewModels.PortfolioPublicViewModel._projects
private

projects 값을 보관합니다.

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

다음에 의해서 참조됨 : LoadAsync(), PortfolioPublicViewModel().

◆ _resumes

readonly IResumeStore PortfolioApp.ViewModels.PortfolioPublicViewModel._resumes
private

resumes 값을 보관합니다.

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

다음에 의해서 참조됨 : LoadAsync(), PortfolioPublicViewModel().

◆ _tenants

readonly IPortfolioTenantStore PortfolioApp.ViewModels.PortfolioPublicViewModel._tenants
private

tenants 값을 보관합니다.

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

다음에 의해서 참조됨 : LoadAsync(), PortfolioPublicViewModel().

속성 문서화

◆ AllTags

IEnumerable<string> PortfolioApp.ViewModels.PortfolioPublicViewModel.AllTags
get

All Tags 값을 가져옵니다.

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

◆ Config

PortfolioConfig? PortfolioApp.ViewModels.PortfolioPublicViewModel.Config
getprivate set

Config 값을 가져오거나 설정합니다.

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

70{ get; private set; }

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

◆ ContactEmail

string PortfolioApp.ViewModels.PortfolioPublicViewModel.ContactEmail = ""
getset

Contact Email 값을 가져오거나 설정합니다.

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

126{ get; set; } = "";

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

◆ ContactMessage

string PortfolioApp.ViewModels.PortfolioPublicViewModel.ContactMessage = ""
getset

Contact Message 값을 가져오거나 설정합니다.

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

135{ get; set; } = "";

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

◆ ContactName

string PortfolioApp.ViewModels.PortfolioPublicViewModel.ContactName = ""
getset

Contact Name 값을 가져오거나 설정합니다.

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

117{ get; set; } = "";

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

◆ FilteredProjects

List<ProjectItem> PortfolioApp.ViewModels.PortfolioPublicViewModel.FilteredProjects
getprivate

Filtered Projects 값을 가져옵니다.

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

216 {
217 get
218 {
219 var q = Projects.AsEnumerable();
220 if (!string.IsNullOrWhiteSpace(Query))
221 {
222 var lq = Query.ToLowerInvariant();
223 q = q.Where(p => p.Title.ToLower().Contains(lq)
224 || p.Description.ToLower().Contains(lq)
225 || p.Tags.Any(t => t.ToLower().Contains(lq)));
226 }
227 if (!string.IsNullOrWhiteSpace(SelectedTag))
228 q = q.Where(p => p.Tags.Contains(SelectedTag));
229 if (!string.IsNullOrWhiteSpace(SelectedCategory) &&
230 Enum.TryParse<ProjectCategory>(SelectedCategory, out var cat))
231 q = q.Where(p => p.Category == cat);
232 return q.ToList();
233 }
234 }

◆ HasLoaded

bool PortfolioApp.ViewModels.PortfolioPublicViewModel.HasLoaded
getprivate set

Has Loaded 값을 가져오거나 설정합니다.

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

97{ get; private set; }

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

◆ Personal

List<ProjectItem> PortfolioApp.ViewModels.PortfolioPublicViewModel.Personal
get

Personal 값을 가져옵니다.

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

◆ Projects

List<ProjectItem> PortfolioApp.ViewModels.PortfolioPublicViewModel.Projects = []
getprivate set

Projects 값을 가져오거나 설정합니다.

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

79{ get; private set; } = [];

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

◆ Public

List<ProjectItem> PortfolioApp.ViewModels.PortfolioPublicViewModel.Public
get

Public 값을 가져옵니다.

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

◆ Query

string PortfolioApp.ViewModels.PortfolioPublicViewModel.Query = ""
getset

Query 값을 가져오거나 설정합니다.

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

146{ get; set; } = "";

◆ Resume

ResumeInfo PortfolioApp.ViewModels.PortfolioPublicViewModel.Resume = new()
getprivate set

Resume 값을 가져오거나 설정합니다.

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

88{ get; private set; } = new();

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

◆ SelectedCategory

string PortfolioApp.ViewModels.PortfolioPublicViewModel.SelectedCategory = ""
getset

Selected Category 값을 가져오거나 설정합니다.

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

164{ get; set; } = "";

◆ SelectedTag

string PortfolioApp.ViewModels.PortfolioPublicViewModel.SelectedTag = ""
getset

Selected Tag 값을 가져오거나 설정합니다.

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

155{ get; set; } = "";

◆ StatusMessage

string PortfolioApp.ViewModels.PortfolioPublicViewModel.StatusMessage = ""
getset

Status Message 값을 가져오거나 설정합니다.

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

106{ get; set; } = "";

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

◆ Work

List<ProjectItem> PortfolioApp.ViewModels.PortfolioPublicViewModel.Work
get

Work 값을 가져옵니다.

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


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