예제 #1
0
 public PropertyVariableCommand(Bulka.CommandLine.CommandLine commandLine, object targetObject, PropertyInfo propertyInfo, bool save = true, bool isPure = false)
     : base(commandLine, save)
 {
     _targetObject = targetObject;
     _propertyInfo = propertyInfo;
     IsPure        = isPure;
 }
예제 #2
0
 public VirtualVariableCommand(Bulka.CommandLine.CommandLine commandLine, Func <object> getter, Action <object> setter, bool isPure = false, bool save = true)
     : base(commandLine, save)
 {
     Getter  = getter;
     _setter = setter;
     IsPure  = isPure;
 }
예제 #3
0
 protected ProcedureCommand(Bulka.CommandLine.CommandLine commandLine, string[] argumentNames) : base(commandLine)
 {
     _argumentIndexes = new OneToOneMap <string, int>();
     for (var i = 0; i < argumentNames.Length; i++)
     {
         var name = argumentNames[i];
         if (_argumentIndexes.ContainsKey(name))
         {
             throw new Exception($"Duplicate argument '{name}'");
         }
         _argumentIndexes.Add(name, i);
     }
 }
예제 #4
0
 public FieldVariableCommand(Bulka.CommandLine.CommandLine commandLine, object targetObject, FieldInfo fieldInfo, bool save = true) : base(commandLine, save)
 {
     _targetObject = targetObject;
     _fieldInfo    = fieldInfo;
 }
예제 #5
0
 public ActionProcedureCommand(Bulka.CommandLine.CommandLine commandLine, string[] argumentNames, Action <ProcedureArguments> action) : base(commandLine, argumentNames)
 {
     _action = action;
 }
예제 #6
0
 protected Command(Bulka.CommandLine.CommandLine commandLine)
 {
     CommandLine = commandLine;
 }
예제 #7
0
 protected VariableCommand(Bulka.CommandLine.CommandLine commandLine, bool save) : base(commandLine)
 {
     Save = save;
 }
예제 #8
0
 public MethodProcedureCommand(Bulka.CommandLine.CommandLine commandLine, string[] argumentNames, object targetObject, MethodInfo methodInfo)
     : base(commandLine, argumentNames)
 {
     _targetObject = targetObject;
     _methodInfo   = methodInfo;
 }