diff options
Diffstat (limited to 'Software/Tango.NET')
| -rw-r--r-- | Software/Tango.NET/Tango.Protobuf/IProtoCompiler.cs | 22 | ||||
| -rw-r--r-- | Software/Tango.NET/Tango.Protobuf/Properties/AssemblyInfo.cs | 6 | ||||
| -rw-r--r-- | Software/Tango.NET/Tango.Protobuf/ProtoCompiler.cs | 51 | ||||
| -rw-r--r-- | Software/Tango.NET/Tango.Protobuf/Tango.Protobuf.csproj | 62 | ||||
| -rw-r--r-- | Software/Tango.NET/Tango.sln | 27 | ||||
| -rw-r--r-- | Software/Tango.NET/Versioning/GlobalVersionInfo.cs | 13 |
6 files changed, 181 insertions, 0 deletions
diff --git a/Software/Tango.NET/Tango.Protobuf/IProtoCompiler.cs b/Software/Tango.NET/Tango.Protobuf/IProtoCompiler.cs new file mode 100644 index 000000000..bd2923ede --- /dev/null +++ b/Software/Tango.NET/Tango.Protobuf/IProtoCompiler.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Protobuf +{ + /// <summary> + /// Represents a protobuf messages compiler. + /// </summary> + public interface IProtoCompiler : IDisposable + { + /// <summary> + /// Compiles the specified .proto message file and saves the result at the specified output folder. + /// </summary> + /// <param name="inputFile">.proto file to compile</param> + /// <param name="outputFolder">Output folder to save the resulted source code.</param> + /// <returns>A list of output source code files.</returns> + List<String> Compile(String inputFile, String outputFolder); + } +} diff --git a/Software/Tango.NET/Tango.Protobuf/Properties/AssemblyInfo.cs b/Software/Tango.NET/Tango.Protobuf/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..37ad6afb4 --- /dev/null +++ b/Software/Tango.NET/Tango.Protobuf/Properties/AssemblyInfo.cs @@ -0,0 +1,6 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Twine - Protobuf Components")] +[assembly: ComVisible(false)]
\ No newline at end of file diff --git a/Software/Tango.NET/Tango.Protobuf/ProtoCompiler.cs b/Software/Tango.NET/Tango.Protobuf/ProtoCompiler.cs new file mode 100644 index 000000000..0095046ce --- /dev/null +++ b/Software/Tango.NET/Tango.Protobuf/ProtoCompiler.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Protobuf +{ + public abstract class ProtoCompiler : IProtoCompiler + { + public List<string> Compile(string inputFile, string outputFolder) + { + throw new NotImplementedException(); + } + + #region IDisposable Support + private bool disposedValue = false; // To detect redundant calls + + protected virtual void Dispose(bool disposing) + { + if (!disposedValue) + { + 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. + + disposedValue = true; + } + } + + // TODO: override a finalizer only if Dispose(bool disposing) above has code to free unmanaged resources. + // ~ProtoCompiler() { + // // Do not change this code. Put cleanup code in Dispose(bool disposing) above. + // 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. + Dispose(true); + // TODO: uncomment the following line if the finalizer is overridden above. + // GC.SuppressFinalize(this); + } + #endregion + } +} diff --git a/Software/Tango.NET/Tango.Protobuf/Tango.Protobuf.csproj b/Software/Tango.NET/Tango.Protobuf/Tango.Protobuf.csproj new file mode 100644 index 000000000..87aa6bc31 --- /dev/null +++ b/Software/Tango.NET/Tango.Protobuf/Tango.Protobuf.csproj @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{40073806-914E-4E78-97AB-FA9639308EBE}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Tango.Protobuf</RootNamespace> + <AssemblyName>Tango.Protobuf</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\Build\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="ProtoCompiler.cs" /> + <Compile Include="IProtoCompiler.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <Content Include="..\..\External Repositories\Protobuf\protoc-1.0M4.jar"> + <Link>Utils\protoc-1.0M4.jar</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\..\External Repositories\Protobuf\protoc-c.exe"> + <Link>Utils\protoc-c.exe</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="..\..\External Repositories\Protobuf\protoc.exe"> + <Link>Utils\protoc.exe</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Tango.NET/Tango.sln b/Software/Tango.NET/Tango.sln new file mode 100644 index 000000000..f6a1c1940 --- /dev/null +++ b/Software/Tango.NET/Tango.sln @@ -0,0 +1,27 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26430.16 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Protobuf", "Tango.Protobuf\Tango.Protobuf.csproj", "{40073806-914E-4E78-97AB-FA9639308EBE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Versioning", "Versioning", "{E53A5748-F312-4A70-AB93-53249749D359}" + ProjectSection(SolutionItems) = preProject + Versioning\GlobalVersionInfo.cs = Versioning\GlobalVersionInfo.cs + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {40073806-914E-4E78-97AB-FA9639308EBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40073806-914E-4E78-97AB-FA9639308EBE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40073806-914E-4E78-97AB-FA9639308EBE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40073806-914E-4E78-97AB-FA9639308EBE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Software/Tango.NET/Versioning/GlobalVersionInfo.cs b/Software/Tango.NET/Versioning/GlobalVersionInfo.cs new file mode 100644 index 000000000..a1208cae9 --- /dev/null +++ b/Software/Tango.NET/Versioning/GlobalVersionInfo.cs @@ -0,0 +1,13 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + + +[assembly: AssemblyProduct("Tango")] + +[assembly: AssemblyCompany("Twine")] +[assembly: AssemblyCopyright("Copyright © Twine LTD 2017")] +[assembly: AssemblyTrademark("Twine LTD")] + +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] |
