public void reloadPolicy(string jsonContent) { FilterPolicy newPolicy = JSONBaseClass.FromJSONString <FilterPolicy>(jsonContent, defValue: null); if (newPolicy != null) { proxyMode = newPolicy.proxyMode; BlockedPhrases = newPolicy.BlockedPhrases; AllowedDomains = newPolicy.AllowedDomains; } }
// ========================= Save & Load public void reloadPolicy(string jsonContent) { PortsOwnerPolicy newPolicy = JSONBaseClass.FromJSONString <PortsOwnerPolicy>(jsonContent, defValue: null); if (newPolicy != null) { TrustedProcessIds = newPolicy.TrustedProcessIds; PolicyMode = newPolicy.PolicyMode; TrustedUsers = newPolicy.TrustedUsers; TrustedGroups = newPolicy.TrustedGroups; AllowedPaths = newPolicy.AllowedPaths; } }