ShopPlatform.Web
1.0.0.0
농산물, 소프트웨어 라이선스와 개발 용역을 직접 판매하는 CodeMaru 직영 쇼핑몰입니다.
Toggle main menu visibility
로딩중...
검색중...
일치하는것 없음
ShopCustomerSession.cs
이 파일의 문서화 페이지로 가기
1
using
ShopPlatform.Models
;
2
3
namespace
ShopPlatform.Services
;
4
13
public
sealed
class
ShopCustomerSession
14
{
23
public
ShopUser
?
User
{
get
;
private
set
; }
32
public
bool
IsLoggedIn
=>
User
!=
null
;
33
50
public
void
Login
(
ShopUser
user) =>
User
= user;
75
public
void
LoginFromCommonUser
(
ShopCurrentUser
user,
ShopCustomerProfile
? profile)
76
{
77
User
=
new
ShopUser
78
{
79
Email = profile?.
Email
?? user.Email,
80
Name = !
string
.IsNullOrWhiteSpace(profile?.Name)
81
? profile.Name
82
: !
string
.IsNullOrWhiteSpace(user.DisplayName) ? user.DisplayName : user.Email,
83
Phone = profile?.
Phone
??
string
.Empty,
84
Address = profile?.
Address
?? string.Empty
85
};
86
}
87
96
public
void
Logout
() =>
User
=
null
;
97
}
ShopPlatform.Models
Definition
CartItem.cs:1
ShopPlatform.Services
Definition
CartService.cs:3
ShopPlatform.Services.ShopCurrentUser
record ShopCurrentUser(string Id, string Provider, string Email, string DisplayName)
Definition
ShopUserContext.cs:15
ShopPlatform.Models.ShopCustomerProfile
Definition
ShopCustomerProfile.cs:12
ShopPlatform.Models.ShopCustomerProfile.Email
string Email
Definition
ShopCustomerProfile.cs:39
ShopPlatform.Models.ShopCustomerProfile.Address
string Address
Definition
ShopCustomerProfile.cs:75
ShopPlatform.Models.ShopCustomerProfile.Phone
string Phone
Definition
ShopCustomerProfile.cs:66
ShopPlatform.Models.ShopUser
Definition
ShopUser.cs:12
ShopPlatform.Services.ShopCustomerSession
Definition
ShopCustomerSession.cs:14
ShopPlatform.Services.ShopCustomerSession.Logout
void Logout()
Definition
ShopCustomerSession.cs:96
ShopPlatform.Services.ShopCustomerSession.User
ShopUser? User
Definition
ShopCustomerSession.cs:23
ShopPlatform.Services.ShopCustomerSession.Login
void Login(ShopUser user)
Definition
ShopCustomerSession.cs:50
ShopPlatform.Services.ShopCustomerSession.LoginFromCommonUser
void LoginFromCommonUser(ShopCurrentUser user, ShopCustomerProfile? profile)
Definition
ShopCustomerSession.cs:75
ShopPlatform.Services.ShopCustomerSession.IsLoggedIn
bool IsLoggedIn
Definition
ShopCustomerSession.cs:32
Services
ShopCustomerSession.cs
다음에 의해 생성됨 :
1.17.0