diff --git a/ConsoleBuffer.sln b/ConsoleBuffer.sln new file mode 100644 index 0000000..bb43cd1 --- /dev/null +++ b/ConsoleBuffer.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2036 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleBuffer", "ConsoleBuffer\ConsoleBuffer.csproj", "{A16D11B0-4785-434F-8514-ABCC16DDFBFD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A16D11B0-4785-434F-8514-ABCC16DDFBFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A16D11B0-4785-434F-8514-ABCC16DDFBFD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A16D11B0-4785-434F-8514-ABCC16DDFBFD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A16D11B0-4785-434F-8514-ABCC16DDFBFD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6099A5B3-4D6B-428B-8D4D-D74F676325FC} + EndGlobalSection +EndGlobal diff --git a/ConsoleBuffer/ConsoleBuffer.csproj b/ConsoleBuffer/ConsoleBuffer.csproj new file mode 100644 index 0000000..a803613 --- /dev/null +++ b/ConsoleBuffer/ConsoleBuffer.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + {A16D11B0-4785-434F-8514-ABCC16DDFBFD} + Library + Properties + ConsoleBuffer + ConsoleBuffer + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ConsoleBuffer/ConsoleWrapper.cs b/ConsoleBuffer/ConsoleWrapper.cs new file mode 100644 index 0000000..04cd09d --- /dev/null +++ b/ConsoleBuffer/ConsoleWrapper.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConsoleBuffer +{ + public sealed class ConsoleWrapper : IDisposable + { + public string Contents { get; private set; } + + public ConsoleWrapper(string[] command) + { + this.Contents = string.Empty; + } + + #region IDisposable Support + private bool disposed = false; // To detect redundant calls + + void Dispose(bool disposing) + { + if (!this.disposed) + { + if (disposing) + { + // TODO: dispose managed state (managed objects). + } + + // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below. + // TODO: set large fields to null. + + this.disposed = true; + } + } + + ~ConsoleWrapper() + { + // Do not change this code. Put cleanup code in Dispose(bool disposing) above. + this.Dispose(false); + } + + // This code added to correctly implement the disposable pattern. + public void Dispose() + { + // Do not change this code. Put cleanup code in Dispose(bool disposing) above. + this.Dispose(true); + // TODO: uncomment the following line if the finalizer is overridden above. + // GC.SuppressFinalize(this); + } + #endregion + } +} diff --git a/ConsoleBuffer/NativeMethods.cs b/ConsoleBuffer/NativeMethods.cs new file mode 100644 index 0000000..8d165dd --- /dev/null +++ b/ConsoleBuffer/NativeMethods.cs @@ -0,0 +1,11 @@ +namespace ConsoleBuffer +{ + public static class NativeMethods + { + public struct COORD + { + public short X; + public short Y; + } + } +} \ No newline at end of file diff --git a/ConsoleBuffer/Properties/AssemblyInfo.cs b/ConsoleBuffer/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..470651d --- /dev/null +++ b/ConsoleBuffer/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ConsoleBuffer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ConsoleBuffer")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a16d11b0-4785-434f-8514-abcc16ddfbfd")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")]