示例#1
0
        private Profile ToProfile(Api.Contracts.Profile apiProfile)
        {
            var profile = new Profile {
                IsPredefined = false
            };

            UpdatePropertiesFromApiProfile(profile, apiProfile);
            return(profile);
        }
示例#2
0
 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;
 }