예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 public bool UpdateProgram(Guid guid, ProgramSet.Config config, UInt64 expiration = 0)
 {
     return(RemoteExec("UpdateProgram", new object[3] {
         guid, config, expiration
     }, false));
 }
예제 #4
0
 protected byte[] PutConfig(ProgramSet.Config config)
 {
     return(PutXmlObj(config));
 }