public bool RemovePolicy(LoadedPolicyObject policy) { PackagePolicy t = JsonConvert.DeserializeObject <PackagePolicy>(policy.PolicyObject.Data); ToRemove.Add(t); return(true); }
public bool UpdatePolicy(LoadedPolicyObject oldpolicy, LoadedPolicyObject newpolicy) { PackagePolicy t1 = JsonConvert.DeserializeObject <PackagePolicy>(oldpolicy.PolicyObject.Data); PackagePolicy t2 = JsonConvert.DeserializeObject <PackagePolicy>(newpolicy.PolicyObject.Data); ToAdd.Add(t2); ToRemove.Add(t1); return(true); }
public bool SetData(FoxSDC_Common.PolicyObject obj) { Pol = obj; PP = JsonConvert.DeserializeObject <PackagePolicy>(obj.Data); if (PP == null) { PP = new PackagePolicy(); } if (PP.Packages == null) { PP.Packages = new List <long>(); } UpdateStatus(); return(true); }