private Profile ToProfile(Api.Contracts.Profile apiProfile) { var profile = new Profile { IsPredefined = false }; UpdatePropertiesFromApiProfile(profile, apiProfile); return(profile); }
private void UpdatePropertiesFromApiProfile(Profile profile, Api.Contracts.Profile apiProfile) { profile.ExternalId = apiProfile.Id; profile.Name = apiProfile.Name; profile.Protocol = MapProtocol(apiProfile.Protocol); profile.ColorCode = apiProfile.Color?.ToUpperInvariant(); profile.Features = MapFeatures(apiProfile.Features); profile.ProfileType = MapType(apiProfile.Type); profile.CountryCode = apiProfile.Country; profile.ServerId = apiProfile.LogicalId; }