コード例 #1
0
		private CommandDefinition GetStubCommandDefinition()
		{
			var argumentsType = typeof(StubArguments);
			var stringArgumentsPropertyInfo = argumentsType.GetProperty(nameof(StubArguments.String));
			var boolArgumentsPropertyInfo = argumentsType.GetProperty(nameof(StubArguments.Flag));

			var commandDefinition = new CommandDefinition(typeof(StubArguments));
			commandDefinition.SetSignature("command");
			commandDefinition.AddParameterDefinition(stringArgumentsPropertyInfo);
			commandDefinition.AddParameterDefinition(boolArgumentsPropertyInfo);

			return commandDefinition;
		}