Permalink
Please sign in to comment.
Showing
with
187 additions
and 4 deletions.
- +2 −0 src/shell.me/ShellMe.CommandLine/IConsole.cs
- +53 −3 src/shell.me/ShellMe.CommandLine/InMemoryCommandHistory.cs
- +10 −1 src/shell.me/ShellMe.CommandLine/NativeConsoleWrapper.cs
- +1 −0 src/shell.me/ShellMe.CommandLine/ShellMe.CommandLine.csproj
- +10 −0 src/shell.me/ShellMe.Testing/TestConsole.cs
- +49 −0 src/shell.me/TestCommands/TestCommands.cs
- +62 −0 src/shell.me/TestCommands/TestCommands.csproj
@@ -0,0 +1,49 @@ | ||
+using System; | ||
+using System.Collections.Generic; | ||
+using System.Linq; | ||
+using System.Text; | ||
+using ShellMe.CommandLine.CommandHandling; | ||
+ | ||
+namespace TestCommands | ||
+{ | ||
+ class TestCommands1 : BaseCommand | ||
+ { | ||
+ public override string Name | ||
+ { | ||
+ get { return "Test1"; } | ||
+ } | ||
+ | ||
+ public bool Log { get; set; } | ||
+ | ||
+ public override void Run() | ||
+ { | ||
+ Console.WriteLine(string.Format("Run Test1 arg = {0}",Log)); | ||
+ } | ||
+ } | ||
+ | ||
+ class TestCommands2 : BaseCommand | ||
+ { | ||
+ public override string Name | ||
+ { | ||
+ get { return "Test2"; } | ||
+ } | ||
+ | ||
+ public override void Run() | ||
+ { | ||
+ Console.WriteLine("Run Test2"); | ||
+ } | ||
+ } | ||
+ | ||
+ class TestCommands3 : BaseCommand | ||
+ { | ||
+ public override string Name | ||
+ { | ||
+ get { return "Test3"; } | ||
+ } | ||
+ | ||
+ public override void Run() | ||
+ { | ||
+ Console.WriteLine("Run Test3"); | ||
+ } | ||
+ } | ||
+} |
@@ -0,0 +1,62 @@ | ||
+<?xml version="1.0" encoding="utf-8"?> | ||
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
+ <PropertyGroup> | ||
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform> | ||
+ <ProductVersion>8.0.30703</ProductVersion> | ||
+ <SchemaVersion>2.0</SchemaVersion> | ||
+ <ProjectGuid>{A895361A-AEBD-4344-89EB-427F566153AF}</ProjectGuid> | ||
+ <OutputType>Library</OutputType> | ||
+ <AppDesignerFolder>Properties</AppDesignerFolder> | ||
+ <RootNamespace>TestCommands</RootNamespace> | ||
+ <AssemblyName>TestCommands</AssemblyName> | ||
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile> | ||
+ <FileAlignment>512</FileAlignment> | ||
+ </PropertyGroup> | ||
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
+ <PlatformTarget>x86</PlatformTarget> | ||
+ <DebugSymbols>true</DebugSymbols> | ||
+ <DebugType>full</DebugType> | ||
+ <Optimize>false</Optimize> | ||
+ <OutputPath>bin\Debug\</OutputPath> | ||
+ <DefineConstants>DEBUG;TRACE</DefineConstants> | ||
+ <ErrorReport>prompt</ErrorReport> | ||
+ <WarningLevel>4</WarningLevel> | ||
+ </PropertyGroup> | ||
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
+ <PlatformTarget>x86</PlatformTarget> | ||
+ <DebugType>pdbonly</DebugType> | ||
+ <Optimize>true</Optimize> | ||
+ <OutputPath>bin\Release\</OutputPath> | ||
+ <DefineConstants>TRACE</DefineConstants> | ||
+ <ErrorReport>prompt</ErrorReport> | ||
+ <WarningLevel>4</WarningLevel> | ||
+ </PropertyGroup> | ||
+ <PropertyGroup> | ||
+ <StartupObject /> | ||
+ </PropertyGroup> | ||
+ <ItemGroup> | ||
+ <Compile Include="TestCommands.cs" /> | ||
+ </ItemGroup> | ||
+ <ItemGroup> | ||
+ <Reference Include="System" /> | ||
+ </ItemGroup> | ||
+ <ItemGroup> | ||
+ <ProjectReference Include="..\ShellMe.CommandLine\ShellMe.CommandLine.csproj"> | ||
+ <Project>{4F0508C3-BC48-442F-8E5A-F932DF34C87B}</Project> | ||
+ <Name>ShellMe.CommandLine</Name> | ||
+ </ProjectReference> | ||
+ </ItemGroup> | ||
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
+ <PropertyGroup> | ||
+ <PostBuildEvent>copy $(TargetPath) $(SolutionDir)ShellMe.Console\$(OutDir)</PostBuildEvent> | ||
+ </PropertyGroup> | ||
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
+ Other similar extension points exist, see Microsoft.Common.targets. | ||
+ <Target Name="BeforeBuild"> | ||
+ </Target> | ||
+ <Target Name="AfterBuild"> | ||
+ </Target> | ||
+ --> | ||
+</Project> |
0 comments on commit
62b2fa6