From af79d2f0076f33191986ceb231b3c5482781ec4f Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Fri, 9 Mar 2018 14:39:39 +0100
Subject: [PATCH] Add ATxDiagnostics console application.

---
 ATxDiagnostics/ATxDiagnostics.cs          | 13 +++++
 ATxDiagnostics/ATxDiagnostics.csproj      | 60 +++++++++++++++++++++++
 ATxDiagnostics/App.config                 |  6 +++
 ATxDiagnostics/Properties/AssemblyInfo.cs | 36 ++++++++++++++
 AutoTx.sln                                |  6 +++
 5 files changed, 121 insertions(+)
 create mode 100644 ATxDiagnostics/ATxDiagnostics.cs
 create mode 100644 ATxDiagnostics/ATxDiagnostics.csproj
 create mode 100644 ATxDiagnostics/App.config
 create mode 100644 ATxDiagnostics/Properties/AssemblyInfo.cs

diff --git a/ATxDiagnostics/ATxDiagnostics.cs b/ATxDiagnostics/ATxDiagnostics.cs
new file mode 100644
index 0000000..d547c33
--- /dev/null
+++ b/ATxDiagnostics/ATxDiagnostics.cs
@@ -0,0 +1,13 @@
+using System;
+using ATxCommon;
+
+namespace ATxDiagnostics
+{
+    class ATxDiagnostics
+    {
+        static void Main(string[] args)
+        {
+            Console.WriteLine(SystemChecks.WmiSummary());
+        }
+    }
+}
diff --git a/ATxDiagnostics/ATxDiagnostics.csproj b/ATxDiagnostics/ATxDiagnostics.csproj
new file mode 100644
index 0000000..645124b
--- /dev/null
+++ b/ATxDiagnostics/ATxDiagnostics.csproj
@@ -0,0 +1,60 @@
+<?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>{1FDA9634-87C9-4C25-AD12-BF79DA61D44D}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>ATxDiagnostics</RootNamespace>
+    <AssemblyName>AutoTxDiagnostics</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <TargetFrameworkProfile />
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</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|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>
+    </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="ATxDiagnostics.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\ATxCommon\ATxCommon.csproj">
+      <Project>{166D65D5-EE10-4364-8AA3-4D86BA5CE244}</Project>
+      <Name>ATxCommon</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
diff --git a/ATxDiagnostics/App.config b/ATxDiagnostics/App.config
new file mode 100644
index 0000000..d1428ad
--- /dev/null
+++ b/ATxDiagnostics/App.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
+    </startup>
+</configuration>
diff --git a/ATxDiagnostics/Properties/AssemblyInfo.cs b/ATxDiagnostics/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..8aa9c84
--- /dev/null
+++ b/ATxDiagnostics/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("AutoTx Diagnostics")]
+[assembly: AssemblyDescription("AutoTx Command Line Diagnostics Tool")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("IMCF, Biozentrum, University of Basel")]
+[assembly: AssemblyProduct("AutoTx")]
+[assembly: AssemblyCopyright("© University of Basel 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("1fda9634-87c9-4c25-ad12-bf79da61d44d")]
+
+// 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")]
diff --git a/AutoTx.sln b/AutoTx.sln
index 920d1a1..81a8bca 100644
--- a/AutoTx.sln
+++ b/AutoTx.sln
@@ -24,6 +24,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
 		Resources\Mail-Templates\Transfer-Success.txt = Resources\Mail-Templates\Transfer-Success.txt
 	EndProjectSection
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ATxDiagnostics", "ATxDiagnostics\ATxDiagnostics.csproj", "{1FDA9634-87C9-4C25-AD12-BF79DA61D44D}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -50,6 +52,10 @@ Global
 		{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Release|Any CPU.Build.0 = Release|Any CPU
+		{1FDA9634-87C9-4C25-AD12-BF79DA61D44D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{1FDA9634-87C9-4C25-AD12-BF79DA61D44D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{1FDA9634-87C9-4C25-AD12-BF79DA61D44D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{1FDA9634-87C9-4C25-AD12-BF79DA61D44D}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
-- 
GitLab