Пример #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="proxy"></param>
 public ProfilesProvider(Proxies.ProfileServiceClient proxy)
 {
     _client = proxy;
 }
Пример #2
0
        private Profile ProxyToProfile(Proxies.Profile proxy)
        {
            Profile profile =
                new Profile()
                {
                    Address = new Address()
                    {
                        Street = proxy.Address.Street,
                        PostalCode = proxy.Address.PostalCode,
                        City = proxy.Address.City
                    },
                    CreatedOn = proxy.CreatedOn,
                    DateOfBirth = proxy.DateOfBirth,
                    Description = proxy.Description,
                    Email = proxy.Email,
                    Gender = proxy.Gender == Proxies.Gender.Male ? Gender.Male : Gender.Female,
                    ID = Guid.Parse(proxy.ID),
                    Name = proxy.Name,
                    Password = proxy.Password,
                    Photo = proxy.Picture,
                    PhotoUploadedOn = proxy.PictureUploadedOn,
                    Surname = proxy.Surname,
                    UpdatedOn = proxy.UpdatedOn,
                    Username = proxy.Username
                };

            return profile;
        }