// Action for ModuleStart
        public override ModuleError ModuleStart()
        {
            LoadConfig();
            if (PersistentData == null)
                data = new ICMPData();
            else
                data = (ICMPData)PersistentData;

            ModuleError moduleError = new ModuleError();
            moduleError.errorType = ModuleErrorType.Success;
            return moduleError;
        }
Beispiel #2
0
 // Action for ModuleStart
 public override bool ModuleStart()
 {
     try
     {
         data = Load<ICMPData>();
         if (data == null)
             data = new ICMPData();
     }
     catch (Exception e)
     {
         LogCenter.Instance.LogException(e);
     }
     return true;
 }
Beispiel #3
0
 // Action for ModuleStart
 public override bool ModuleStart()
 {
     try
     {
         data = Load <ICMPData>();
         if (data == null)
         {
             data = new ICMPData();
         }
     }
     catch (Exception e)
     {
         LogCenter.Instance.LogException(e);
     }
     return(true);
 }
Beispiel #4
0
        // Action for ModuleStart
        public override ModuleError ModuleStart()
        {
            LoadConfig();
            if (PersistentData == null)
            {
                data = new ICMPData();
            }
            else
            {
                data = (ICMPData)PersistentData;
            }

            ModuleError moduleError = new ModuleError();

            moduleError.errorType = ModuleErrorType.Success;
            return(moduleError);
        }
Beispiel #5
0
        // Action for ModuleStop
        public override bool ModuleStop()
        {
            try
            {
                if (data != null)
                {
                    ICMPData d = data;
                    if (!data.Save)
                    {
                        data.RuleTable   = new SerializableDictionary <string, List <string> >();
                        data.RuleTablev6 = new SerializableDictionary <string, List <string> >();
                    }
                    Save <ICMPData>(d);
                }
            }
            catch (Exception e)
            {
                LogCenter.Instance.LogException(e);
            }

            return(true);
        }