private CustomerProxy MapToProxy(Customer customer) { return(new CustomerProxy { CustomerId = customer.CustomerId, Name = customer.Name, ShippingAddress = customer.ShippingAddress, City = customer.City, PostalCode = customer.PostalCode, Country = customer.Country, ProfilePictureValueHolder = new ProfilePictureValueHolder(), ProfilePictureValueHolder2 = new Lazy <byte[]>(() => { return ProfilePictureService.GetFor(customer.Name); }) }); }
public void Load() { if (IsGhost) { status = LoadStatus.LOADING; var customer = load(); base.Name = customer.Name; base.ShippingAddress = customer.ShippingAddress; base.City = customer.City; base.PostalCode = customer.PostalCode; base.Country = customer.Country; ProfilePictureValueHolder = new ProfilePictureValueHolder(); ProfilePictureValueHolder2 = new Lazy <byte[]>(() => { return(ProfilePictureService.GetFor(customer.Name)); }); status = LoadStatus.LOADED; } }
public ProfilePicturesController(ProfilePictureService profilePictureService) { _profilePictureService = profilePictureService; }
public AccountController(UserManager <ChatUser> userManager, SignInManager <ChatUser> signInManager, ProfilePictureService profilePictureService) { _userManager = userManager; _signInManager = signInManager; _profilePictureService = profilePictureService; }
public ProfilePictureValueHolder() : base(name => ProfilePictureService.GetFor(name.ToString())) { }