private static void ParseWebProperties(SP.Web web, SPConfiguration config) { bool syncEnabled; if (web.TryParse(SPWebPropertyKey.SyncEnabled, out syncEnabled)) { config.SyncEnabled = syncEnabled; } bool farmSyncEnabled; if (web.TryParse(SPWebPropertyKey.FarmSyncEnabled, out farmSyncEnabled)) { config.FarmSyncEnabled = farmSyncEnabled; } config.SiteProfileMappedFields = new List <UserFieldMapping>(); web.TryParse(SPWebPropertyKey.SiteSettings, config.SiteProfileMappedFields); config.FarmProfileMappedFields = new List <UserFieldMapping>(); web.TryParse(SPWebPropertyKey.FarmSettings, config.FarmProfileMappedFields); }