Esempio n. 1
0
 public void AddObject(CheckPointObject cpObject)
 {
     if (cpObject != null && !string.IsNullOrEmpty(cpObject.Name) && !HasObject(cpObject.Name))
     {
         _repository.Add(cpObject.Name, new ObjectInfo(cpObject, false));
     }
 }
Esempio n. 2
0
        public static string GenerateObjectScript(CheckPointObject cpObject)
        {
            string scriptInstruction = cpObject.ToCLIScriptInstruction();

            var sb = new StringBuilder();

            if (!string.IsNullOrEmpty(scriptInstruction))
            {
                sb.Append(GenerateInstructionScript(scriptInstruction)).Append(Environment.NewLine);
            }

            sb.Append("cmd='mgmt_cli ").Append(cpObject.ToCLIScript()).Append(" ignore-warnings true -s id.txt --user-agent mgmt_cli_smartmove'")
            .Append(Environment.NewLine)
            .Append("run_command");

            return(sb.ToString());
        }
Esempio n. 3
0
 public ObjectInfo(CheckPointObject cpObject, bool isPredefined)
 {
     Object       = cpObject;
     IsPredefined = isPredefined;
 }