public bool UpdateProgram(Guid guid, ProgramSet.Config config, UInt64 expiration = 0) { List <byte[]> args = new List <byte[]>(); args.Add(PutGuid(guid)); args.Add(PutConfig(config)); args.Add(PutUInt64(expiration)); List <byte[]> ret = RemoteExec("UpdateProgram", args); return(ret != null?GetBool(ret[0]) : false); }
public bool UpdateProgram(Guid guid, ProgramSet.Config config, UInt64 expiration = 0) { ProgramSet progs; if (!ProgramSets.TryGetValue(guid, out progs)) { return(false); } progs.config = config; App.engine.FirewallManager.ApplyRules(progs, expiration); Changed?.Invoke(this, new ListEvent() { guid = progs.guid }); return(true); }
public bool UpdateProgram(Guid guid, ProgramSet.Config config, UInt64 expiration = 0) { return(RemoteExec("UpdateProgram", new object[3] { guid, config, expiration }, false)); }
protected byte[] PutConfig(ProgramSet.Config config) { return(PutXmlObj(config)); }