예제 #1
0
        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;
            }
        }
예제 #2
0
        // ========================= 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;
            }
        }