public void Load(BinaryReader reader) { // Get stored policy config.AuditPolicy policy = config.AuditPolicy.Parse(reader); // Store policy in global variable ConfigPolicy = policy; }
public static AuditPolicy Parse(BinaryReader reader) { // Create instance of policy storage AuditPolicy policy = new AuditPolicy(); List <string> keys = policy.HeaderSettingPairs.Keys.ToList(); // Enumerate audits in dictionary storage foreach (string key in keys) { policy.HeaderSettingPairs[key] = ScoredItem <EAuditSettings> .ParseAuditSettings(reader); } return(policy); }