diff --git a/README.md b/README.md
index 5f99baf8..5ae2f0b1 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
[![Nuget](https://img.shields.io/nuget/vpre/Tx.All.svg)](https://www.nuget.org/packages/Tx.All/)
-![Build](https://ecs10.visualstudio.com/_apis/public/build/definitions/79dfec19-0be4-4364-86ec-b0b3146b0dc3/19/badge)
+[![Build status](https://ci.appveyor.com/api/projects/status/6n09scr9d74lb9vp?svg=true)](https://ci.appveyor.com/project/SergeyBaranchenkov/tx-6doyh)
# Tx (LINQ to Logs and Traces)
diff --git a/References/LinqPad/LINQPad.exe b/References/LinqPad/LINQPad.exe
index e37eca49..15d73f28 100644
Binary files a/References/LinqPad/LINQPad.exe and b/References/LinqPad/LINQPad.exe differ
diff --git a/References/LinqPad/LINQPad.exe.config b/References/LinqPad/LINQPad.exe.config
index 629960ad..ed648544 100644
--- a/References/LinqPad/LINQPad.exe.config
+++ b/References/LinqPad/LINQPad.exe.config
@@ -1,9 +1,48 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Samples/LinqPad/Queries/create_samples_package.cmd b/Samples/LinqPad/Queries/create_samples_package.cmd
index 4dd9e7d0..50b64e16 100644
--- a/Samples/LinqPad/Queries/create_samples_package.cmd
+++ b/Samples/LinqPad/Queries/create_samples_package.cmd
@@ -1,2 +1,2 @@
-del c:\bin\samples.zip
-..\..\..\Tools\zip -r c:\bin\samples.zip header.xml NoManifest HTTP.sys IE_IIS "Performance Counters" SqlXevent WcfTroubleshooting
\ No newline at end of file
+if exist %1 del %1 || goto failFast
+..\..\..\Tools\zip -r %1 header.xml NoManifest HTTP.sys IE_IIS "Performance Counters" SqlXevent WcfTroubleshooting
\ No newline at end of file
diff --git a/Source/AssemblyInfo.cs b/Source/AssemblyInfo.cs
deleted file mode 100644
index 62118593..00000000
--- a/Source/AssemblyInfo.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
-
-using System.Reflection;
-
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("Tx (LINQ to Logs and Traces)")]
-[assembly: AssemblyCopyright("Copyright © Microsoft. All Rights Reserved")]
-[assembly: AssemblyVersion("2.0.1.0")]
-[assembly: AssemblyFileVersion("2.0.1.0")]
diff --git a/Source/Build.cmd b/Source/Build.cmd
index 4cc8abdd..722a09e2 100644
--- a/Source/Build.cmd
+++ b/Source/Build.cmd
@@ -1,70 +1,81 @@
-set bin="c:\Bin"
+set sourceFolder=%~dp0
+set dropFolder=%~dp0
-if not exist "%bin%" mkdir %bin% || goto failFast
+(
+set /p versionParam=
+)<%sourceFolder%version.txt
-if "%1"=="NoBuild" goto noBuild
+echo %versionParam%
-pushd %~dp0
-
-msbuild Tx.sln /p:Configuration=Release45 /p:Platform="Any CPU" || goto failFast
-msbuild Tx.sln /p:Configuration=Debug45 /p:Platform="Any CPU" || goto failFast
+rem set msbuildPath="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe"
+set msbuildPath="msbuild"
+pushd
+cd /d %sourceFolder%SetVersion || goto failFast
+dotnet restore || goto failFast
+dotnet msbuild /p:Configuration=Release || goto failFast
popd
-:noBuild
+pushd %sourceFolder%..\Samples\LinqPad\Queries || goto failFast
+call create_samples_package.cmd %dropFolder%samples.zip
+popd
-copy ..\tools\NuGet.exe %bin%\ || goto failFast
-copy ..\tools\zip.exe %bin%\ || goto failFast
-copy ..\tools\PushPackages.cmd %bin%\ || goto failFast
+call :pack Tx.Core || goto failFast
+call :pack Tx.Windows || goto failFast
+call :pack Tx.Bond || goto failFast
+call :pack Tx.Network || goto failFast
+call :pack Tx.SqlServer || goto failFast
-pushd ..\Samples\LinqPad\Queries || goto failFast
-call create_samples_package.cmd
+pushd
+%sourceFolder%SetVersion\bin\Release\SetVersion.exe %versionParam% %sourceFolder%Tx.Windows.TypeGeneration\Tx.Windows.TypeGeneration.csproj || goto failFast
+cd /d %sourceFolder%Tx.Windows.TypeGeneration || goto failFast
+dotnet restore || goto failFast
+dotnet build -c=Release || goto failFast
+%sourceFolder%SetVersion\bin\Release\SetVersion.exe %versionParam% %sourceFolder%EtwEventTypeGen\EtwEventTypeGen.csproj || goto failFast
+%sourceFolder%SetVersion\bin\Release\SetVersion.exe %versionParam% %sourceFolder%EtwEventTypeGen\Properties\Tx.Windows.TypeGeneration.nuspec || goto failFast
+cd /d %sourceFolder%EtwEventTypeGen || goto failFast
+dotnet restore || goto failFast
+dotnet build -c=Release || goto failFast
+copy %sourceFolder%EtwEventTypeGen\Properties\Tx.Windows.TypeGeneration.nuspec %sourceFolder%EtwEventTypeGen\bin\Release\net45\ || goto failFast
+cd /d %sourceFolder%EtwEventTypeGen\bin\Release\net45 || goto failFast
+%sourceFolder%..\tools\NuGet pack Tx.Windows.TypeGeneration.nuspec || goto failFast
+move %sourceFolder%EtwEventTypeGen\bin\Release\net45\Tx.Windows.TypeGeneration.%versionParam%*.nupkg %dropFolder% || goto failFast
popd
pushd
-
-cd /d %bin%\Debug || goto failFast
-call :setVersion || goto failFast
-call :packAll || goto failFast
-
-cd /d %bin%\Release || goto failFast
-call :setVersion || goto failFast
-call :packAll || goto failFast
-
-cd /d %bin%\Release\Net45 || goto failFast
-..\..\zip.exe ..\..\Tx.LinqPad.lpx header.xml System.Reactive.Interfaces.dll System.Reactive.Core.dll System.Reactive.Linq.dll System.Reactive.PlatformServices.dll System.Reactive.Windows.Forms.dll Tx.Core.dll Tx.Windows.dll Tx.Windows.TypeGeneration.dll Tx.SqlServer.dll msvcr100.dll xe.dll Microsoft.SqlServer.XE.Core.dll Microsoft.SqlServer.XEvent.Configuration.dll Microsoft.SqlServer.XEvent.dll Microsoft.SqlServer.XEvent.Linq.dll Microsoft.SqlServer.XEvent.Targets.dll Tx.LinqPad.dll HTTP_Server.man HTTP_Server.etl BasicPerfCounters.blg CrossMachineHTTP.etl CrossMachineIE.etl IE_Client.man sqltrace.xel Microsoft.Windows.ApplicationServer.Applications.man SampleWcfTrace.etl || goto failFast
-
+%sourceFolder%SetVersion\bin\Release\SetVersion.exe %versionParam% %sourceFolder%Tx.Linqpad\Tx.Linqpad.csproj || goto failFast
+cd /d %sourceFolder%Tx.Linqpad || goto failFast
+dotnet restore || goto failFast
+%msbuildPath% /p:Configuration=Release || goto failFast
+cd /d %sourceFolder%Tx.Linqpad\bin\Release\net46 || goto failFast
+%sourceFolder%..\tools\zip.exe %dropFolder%Tx.LinqPad.lpx header.xml System.Reactive.Interfaces.dll System.Reactive.Core.dll System.Reactive.Linq.dll System.Reactive.PlatformServices.dll System.Reactive.Windows.Forms.dll Tx.Core.dll Tx.Windows.dll Tx.Windows.TypeGeneration.dll Tx.SqlServer.dll %sourceFolder%..\References\XEvent\msvcr100.dll %sourceFolder%..\References\XEvent\xe.dll Microsoft.SqlServer.XE.Core.dll Microsoft.SqlServer.XEvent.Configuration.dll Microsoft.SqlServer.XEvent.dll Microsoft.SqlServer.XEvent.Linq.dll Microsoft.SqlServer.XEvent.Targets.dll Tx.LinqPad.dll HTTP_Server.man HTTP_Server.etl BasicPerfCounters.blg CrossMachineHTTP.etl CrossMachineIE.etl IE_Client.man sqltrace.xel Microsoft.Windows.ApplicationServer.Applications.man SampleWcfTrace.etl || goto failFast
popd
-goto end
-:setVersion
-
-pushd Net45\Properties || goto failFast
-..\SetVersion.exe || goto failFast
+pushd
+%sourceFolder%SetVersion\bin\Release\SetVersion.exe %versionParam% %sourceFolder%Tx.All\Tx.All.nuspec || goto failFast
+cd /d %sourceFolder%Tx.All || goto failFast
+%sourceFolder%..\tools\NuGet pack Tx.All.nuspec || goto failFast
+move %sourceFolder%Tx.All\Tx.All.*.nupkg %dropFolder%\ || goto failFast
popd
-exit /b 0
+cd %dropFolder%
+del /q Tx.%versionParam%.zip
+%sourceFolder%..\tools\zip.exe Tx.%versionParam%.zip samples.zip Tx.LinqPad.lpx || goto failFast
-:packAll
-call :pack Tx.Core || goto failFast
-call :pack Tx.Windows || goto failFast
-call :pack Tx.Bond || goto failFast
-call :pack Tx.Network || goto failFast
-call :pack Tx.Windows.TypeGeneration || goto failFast
-call :pack Tx.SqlServer || goto failFast
-call :pack Tx.All || goto failFast
+for /f "usebackq delims=|" %%f in (`dir /b "*.nupkg"`) do %sourceFolder%..\tools\zip.exe Tx.%versionParam%.zip %%f
-exit /b 0
+goto end
:pack %1
-call Net45\Properties\%1.Layout.cmd || goto failFast
-cd /d %1 || goto failFast
-copy ..\Net45\Properties\%1.nuspec || goto failFast
-..\..\NuGet pack %1.nuspec || goto failFast
-move *.nupkg ..\ || goto failFast
-cd ..
-rd /s/q %1 || goto failFast
-exit /b 0
+
+%sourceFolder%SetVersion\bin\Release\SetVersion.exe %versionParam% %sourceFolder%%1\%1.csproj || goto failFast
+
+pushd
+cd /d %sourceFolder%%1 || goto failFast
+dotnet restore || goto failFast
+dotnet build -c=Release || goto failFast
+move %sourceFolder%%1\bin\Release\%1.*.nupkg %dropFolder% || goto failFast
+popd
:end
cd %~dp0
diff --git a/Source/EtwEventTypeGen/EtwEventTypeGen.csproj b/Source/EtwEventTypeGen/EtwEventTypeGen.csproj
index ff6f99d9..7fb2f784 100644
--- a/Source/EtwEventTypeGen/EtwEventTypeGen.csproj
+++ b/Source/EtwEventTypeGen/EtwEventTypeGen.csproj
@@ -1,67 +1,11 @@

-
+
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {D8051D89-46E1-47E0-AA9A-9B352AE3CC11}
Exe
- Properties
- Microsoft.Etw
- EtwEventTypeGen
- 512
-
-
-
-
-
-
-
-
+ net45
+ 2.1.1
-
-
- ..\..\References\$(BuildFlavor)
-
-
- true
-
-
- ..\key.snk
-
-
-
- True
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {a4517abd-d558-42f3-8fe4-2a6ba3074014}
- Tx.Windows.TypeGeneration
-
-
- {c4043abb-ec40-4194-b15b-c0d13c2cf5c8}
- Tx.Windows
-
+
-
-
\ No newline at end of file
diff --git a/Source/EtwEventTypeGen/Properties/AssemblyInfo.cs b/Source/EtwEventTypeGen/Properties/AssemblyInfo.cs
deleted file mode 100644
index 8d2edfdd..00000000
--- a/Source/EtwEventTypeGen/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-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("EtwEventTypeGen")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("EtwEventTypeGen")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
-[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("5303acb3-7563-4a80-b445-8145334a464a")]
-
diff --git a/Source/EtwEventTypeGen/Properties/Tx.Windows.TypeGeneration.nuspec b/Source/EtwEventTypeGen/Properties/Tx.Windows.TypeGeneration.nuspec
new file mode 100644
index 00000000..68eefd98
--- /dev/null
+++ b/Source/EtwEventTypeGen/Properties/Tx.Windows.TypeGeneration.nuspec
@@ -0,0 +1,27 @@
+
+
+
+ Tx.Windows.TypeGeneration
+ Tx.Windows.TypeGeneration
+
+ 2.1.1
+ Tx (LINQ to Logs and Traces) components for generation of C# types representing Event Tracing for Windows (ETW) and Event Log events
+ Microsoft
+ Copyright © Microsoft. All Rights Reserved
+ http://tx.codeplex.com
+ http://tx.codeplex.com/license
+ en-us
+ Tx Traces Logs Playback Replay ETW
+ false
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/SetVersion/App.config b/Source/SetVersion/App.config
new file mode 100644
index 00000000..8e156463
--- /dev/null
+++ b/Source/SetVersion/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/SetVersion/Program.cs b/Source/SetVersion/Program.cs
index 138db2a7..ffe107b0 100644
--- a/Source/SetVersion/Program.cs
+++ b/Source/SetVersion/Program.cs
@@ -1,67 +1,99 @@
-// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
-
-using System;
+using System;
using System.IO;
+using System.Linq;
using System.Xml.Linq;
namespace SetVersion
{
internal class Program
{
- private const string Prefix = "[assembly: AssemblyVersion(";
-
- private static void Main()
+ private static void Main(string[] args)
{
- string version = GetVersion();
- Console.WriteLine(version);
+ string version = args[0];
+ var validCharacters = "1234567890.".ToCharArray();
+ var hasInvalidCharacters = version
+ .ToCharArray()
+ .Except(validCharacters).Any();
- string[] specs = Directory.GetFiles(".", "*.nuspec");
- foreach (string s in specs)
+ if (hasInvalidCharacters)
{
- Console.WriteLine(s);
- FixNuSpec(s, version);
+ throw new ApplicationException("Version is in invalid format: " + version);
}
- }
- private static string GetVersion()
- {
- StreamReader reader = File.OpenText("AssemblyInfo.cs");
- string line = reader.ReadLine();
+ string filename = args[1];
- while (line != null)
+ if (!File.Exists(filename))
{
- if (!line.StartsWith(Prefix))
- {
- line = reader.ReadLine();
- continue;
- }
-
- int startIndex = Prefix.Length + 1;
- int endIndex = line.LastIndexOf('.');
- return line.Substring(startIndex, endIndex - startIndex);
+ throw new FileNotFoundException(filename);
}
- throw new Exception("could not find AssemblyVersion attribute");
- }
+ var extension = Path.GetExtension(filename);
- private static void FixNuSpec(string path, string version)
- {
- XDocument spec = XDocument.Load(path);
- XElement xeMetadata = spec.Element("package").Element("metadata");
+ if (new[] { extension }
+ .Except(new[] { ".csproj", ".nuspec" }, StringComparer.OrdinalIgnoreCase).Any())
+ {
+ throw new ApplicationException("Only csproj and nuspec files are supported");
+ }
+
+ var document = XDocument.Load(filename);
- XElement xeVersion = xeMetadata.Element("version");
- xeVersion.SetValue(xeVersion.Value.Replace("{version}", version));
+ XElement parentElement = null;
- XElement xeDependencies = xeMetadata.Element("dependencies");
- foreach (XElement xeDependency in xeDependencies.Elements("dependency"))
+ if (string.Equals(extension, ".csproj", StringComparison.OrdinalIgnoreCase))
+ {
+ parentElement = document.Descendants("Project")
+ .First()
+ .Descendants("PropertyGroup")
+ .First();
+ }
+ else if(string.Equals(extension, ".nuspec", StringComparison.OrdinalIgnoreCase))
{
- if (!xeDependency.Attribute("id").Value.StartsWith("Tx."))
- continue;
+ parentElement = document.Descendants("package")
+ .First()
+ .Descendants("metadata")
+ .First();
- xeDependency.SetAttributeValue("version", xeDependency.Attribute("version").Value.Replace("{version}", version));
+ foreach (var item in parentElement
+ .Descendants("dependencies")
+ .Descendants())
+ {
+ var attribute = item.Attribute(XName.Get("id"));
+ if (attribute.Value.StartsWith("Tx."))
+ {
+ var versionAttribute = item.Attribute(XName.Get("version"));
+ if (versionAttribute.Value.Contains("{version}"))
+ {
+ versionAttribute.Value = versionAttribute.Value.Replace("{version}", version);
+ }
+ else
+ {
+ versionAttribute.Value = version;
+ }
+ }
+ }
+ }
+
+ var versionElement = parentElement
+ .Descendants()
+ .FirstOrDefault(i => string.Equals(i.Name.ToString(), "Version", StringComparison.OrdinalIgnoreCase));
+
+ if (versionElement != null)
+ {
+ if (versionElement.Value.Contains("{version}"))
+ {
+ versionElement.Value = versionElement.Value.Replace("{version}", version);
+ }
+ else
+ {
+ versionElement.Value = version;
+ }
+ }
+ else
+ {
+ parentElement.Add(new XElement(XName.Get("Version")) { Name = "Version", Value = version });
}
- spec.Save(path);
+ document.Save(filename);
}
}
-}
\ No newline at end of file
+}
diff --git a/Test/UnitTests/Properties/AssemblyInfo.cs b/Source/SetVersion/Properties/AssemblyInfo.cs
similarity index 70%
rename from Test/UnitTests/Properties/AssemblyInfo.cs
rename to Source/SetVersion/Properties/AssemblyInfo.cs
index b348689a..dac09623 100644
--- a/Test/UnitTests/Properties/AssemblyInfo.cs
+++ b/Source/SetVersion/Properties/AssemblyInfo.cs
@@ -2,32 +2,35 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// 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("Tests.Tx")]
+[assembly: AssemblyTitle("SetVersion")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Tests.Tx.Properties")]
-[assembly: AssemblyCopyright("Copyright © 2016")]
+[assembly: AssemblyProduct("SetVersion")]
+[assembly: AssemblyCopyright("Copyright © 2017")]
[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
+// 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("4e72f349-2472-45a4-9e2d-f35e92a7b015")]
+[assembly: Guid("d4b1be53-01b5-4341-869e-bcbbf7160ebb")]
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor 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/Source/SetVersion/SetVersion.csproj b/Source/SetVersion/SetVersion.csproj
index 353de5cd..f0bf9a36 100644
--- a/Source/SetVersion/SetVersion.csproj
+++ b/Source/SetVersion/SetVersion.csproj
@@ -1,38 +1,48 @@

-
+
Debug
AnyCPU
- {8E9F5FFD-5533-4384-9841-9D07CDCEBB76}
+ {D4B1BE53-01B5-4341-869E-BCBBF7160EBB}
Exe
- Properties
SetVersion
SetVersion
+ v4.5
512
-
-
- ..\..\References\$(BuildFlavor)
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
-
- Properties\AssemblyInfo.cs
-
+
+
+
+
-
\ No newline at end of file
diff --git a/Source/Tx.Core/Properties/Tx.All.nuspec b/Source/Tx.All/Tx.All.nuspec
similarity index 52%
rename from Source/Tx.Core/Properties/Tx.All.nuspec
rename to Source/Tx.All/Tx.All.nuspec
index 2ddfdaab..64deb1d4 100644
--- a/Source/Tx.Core/Properties/Tx.All.nuspec
+++ b/Source/Tx.All/Tx.All.nuspec
@@ -1,24 +1,22 @@
-
+
Tx.All
Tx.All
- {version}
+ 2.1.1
Tx (LINQ to Logs and Traces) container package for all supported raw trace/log sources
Microsoft
Copyright © Microsoft. All Rights Reserved
-
http://tx.codeplex.com
http://tx.codeplex.com/license
-
en-us
- Tx Traces Logs Playback Replay XEvent ETW
- false
+ Tx Traces Logs Playback Replay XEvent ETW
+ false
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/Source/Tx.Bond/Properties/Tx.Bond.Layout.cmd b/Source/Tx.Bond/Properties/Tx.Bond.Layout.cmd
deleted file mode 100644
index 8d98bf72..00000000
--- a/Source/Tx.Bond/Properties/Tx.Bond.Layout.cmd
+++ /dev/null
@@ -1,6 +0,0 @@
-rd /s/q Tx.Bond
-
-md Tx.Bond\lib\Net45
-copy Net45\Tx.Bond.dll Tx.Bond\lib\Net45
-copy Net45\Tx.Bond.xml Tx.Bond\lib\Net45
-copy Net45\Tx.Bond.pdb Tx.Bond\lib\Net45
\ No newline at end of file
diff --git a/Source/Tx.Bond/Properties/Tx.Bond.nuspec b/Source/Tx.Bond/Properties/Tx.Bond.nuspec
deleted file mode 100644
index 7fbca838..00000000
--- a/Source/Tx.Bond/Properties/Tx.Bond.nuspec
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
- Tx.Bond
- Tx.Bond
-
- {version}
- Tx (LINQ to Logs and Traces) Binary-in-ETW transport components
- Microsoft
- Copyright © Microsoft. All Rights Reserved
-
- http://tx.codeplex.com
- http://tx.codeplex.com/license
-
- en-us
- Tx Traces Logs Playback Replay ETW Bond
- false
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Source/Tx.Bond/Tx.Bond.csproj b/Source/Tx.Bond/Tx.Bond.csproj
index 7fdb822e..67c6b597 100644
--- a/Source/Tx.Bond/Tx.Bond.csproj
+++ b/Source/Tx.Bond/Tx.Bond.csproj
@@ -1,102 +1,35 @@

-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {6DCE4A40-4946-41B0-ABE5-CE1700B598E9}
- Library
- Properties
- Tx.Bond
- Tx.Bond
- 512
-
-
-
-
- ..\..\References\$(BuildFlavor)
-
-
- $(OutputPath)\$(AssemblyName).XML
-
-
- true
-
+
+ net45
+ True
..\key.snk
+ Tx (LINQ to Logs and Traces) Binary-in-ETW transport components
+ Microsoft
+ Microsoft
+ True
+ Tx Traces Logs Playback Replay ETW Bond
+ git
+ Copyright © Microsoft. All Rights Reserved
+ https://github.com/Microsoft/Tx/blob/master/license.txt
+ https://github.com/Microsoft/Tx/
+ https://github.com/Microsoft/Tx.git
+ 2.1.1
+
+
+ bin\Release\net45\Tx.Bond.xml
-
- $(CPReferencePath)\Bond.dll
-
-
- $(CPReferencePath)\Bond.Attributes.dll
-
-
- False
- $(CPReferencePath)\Microsoft.Diagnostics.Tracing.EventSource.dll
-
-
-
- $(CPReferencePath)\System.Reactive.Core.dll
-
-
- $(CPReferencePath)\System.Reactive.Interfaces.dll
-
-
- $(CPReferencePath)\System.Reactive.Linq.dll
-
-
- $(CPReferencePath)\System.Reactive.PlatformServices.dll
-
-
+
+
-
- Properties\AssemblyInfo.cs
- Always
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
- Properties\key.snk
-
-
- Always
-
-
- Always
- Designer
-
+
-
- {c5cc33b0-1684-4dd4-83a5-5da4a9a25a7f}
- Tx.Core
-
-
- {c4043abb-ec40-4194-b15b-c0d13c2cf5c8}
- Tx.Windows
-
+
-
\ No newline at end of file
diff --git a/Source/Tx.Bond/Tx.Bond.csproj.DotSettings b/Source/Tx.Bond/Tx.Bond.csproj.DotSettings
deleted file mode 100644
index 827beb42..00000000
--- a/Source/Tx.Bond/Tx.Bond.csproj.DotSettings
+++ /dev/null
@@ -1,2 +0,0 @@
-
- Experimental
\ No newline at end of file
diff --git a/Source/Tx.Core/CompositeDeserializer.cs b/Source/Tx.Core/CompositeDeserializer.cs
index 7db3272e..50764109 100644
--- a/Source/Tx.Core/CompositeDeserializer.cs
+++ b/Source/Tx.Core/CompositeDeserializer.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
+using System.Reflection;
namespace System.Reactive
{
@@ -22,33 +23,35 @@ public CompositeDeserializer(
_deserializers = new List>();
foreach (ITypeMap mapInstance in typeMaps)
{
- Type mapInterface = mapInstance.GetType().GetInterfaces()
+ Type mapInterface = mapInstance.GetType().GetTypeInfo().ImplementedInterfaces
.FirstOrDefault(i => i.Name == typeof(IPartitionableTypeMap<,>).Name);
if (mapInterface != null)
{
Type deserializerType =
- typeof (PartitionKeyDeserializer<,>).MakeGenericType(mapInterface.GetGenericArguments());
+ typeof (PartitionKeyDeserializer<,>).MakeGenericType(mapInterface.GenericTypeArguments);
object deserializerInstance = Activator.CreateInstance(deserializerType, mapInstance);
_deserializers.Add((IDeserializer) deserializerInstance);
continue;
}
- mapInterface = mapInstance.GetType().GetInterface(typeof(IRootTypeMap<,>).Name);
+ mapInterface = mapInstance.GetType().GetTypeInfo().ImplementedInterfaces
+ .FirstOrDefault(i => i.Name == typeof(IRootTypeMap<,>).Name);
if (mapInterface != null)
{
Type deserializerType =
- typeof (RootDeserializer<,>).MakeGenericType(mapInterface.GetGenericArguments());
+ typeof (RootDeserializer<,>).MakeGenericType(mapInterface.GenericTypeArguments);
object deserializerInstance = Activator.CreateInstance(deserializerType, mapInstance);
_deserializers.Add((IDeserializer) deserializerInstance);
continue;
}
- mapInterface = mapInstance.GetType().GetInterface(typeof(ITypeMap<>).Name);
+ mapInterface = mapInstance.GetType().GetTypeInfo().ImplementedInterfaces
+ .FirstOrDefault(i => i.Name == typeof(ITypeMap<>).Name);
if (mapInterface != null)
{
Type deserializerType =
- typeof (TransformDeserializer<>).MakeGenericType(mapInterface.GetGenericArguments());
+ typeof (TransformDeserializer<>).MakeGenericType(mapInterface.GenericTypeArguments);
object deserializerInstance = Activator.CreateInstance(deserializerType, mapInstance);
_deserializers.Add((IDeserializer) deserializerInstance);
continue;
@@ -105,7 +108,7 @@ public void OnNext(TInput value)
{
if (timestamp.HasValue && timestamp.Value != ts.Timestamp)
{
- _observer.OnError(new ApplicationException("Several type maps return different timestamps for the same source event."));
+ _observer.OnError(new Exception("Several type maps return different timestamps for the same source event."));
return;
}
diff --git a/Source/Tx.Core/Converter.cs b/Source/Tx.Core/Converter.cs
index 370973a1..51ee12a3 100644
--- a/Source/Tx.Core/Converter.cs
+++ b/Source/Tx.Core/Converter.cs
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+ using System.Reflection;
public class Converter : IObserver
{
@@ -16,11 +17,11 @@ public Converter(IObserver next, params ITransformBuilder[] transfor
{
if (next == null)
{
- throw new ArgumentNullException("next");
+ throw new ArgumentNullException(nameof(next));
}
if (transformBuilders == null)
{
- throw new ArgumentNullException("transformBuilders");
+ throw new ArgumentNullException(nameof(transformBuilders));
}
this.next = next;
@@ -70,7 +71,7 @@ public void RegisterTransformerBuilder(ITransformBuilder transformBuilder)
{
if (transformBuilder == null)
{
- throw new ArgumentNullException("transformBuilder", "Cannot be null.");
+ throw new ArgumentNullException(nameof(transformBuilder), "Cannot be null.");
}
this.transformBuilders = this.transformBuilders
@@ -99,7 +100,7 @@ internal static class E
public static Func Build(this ITransformBuilder transformBuilder, Type type)
{
var method = typeof(ITransformBuilder)
- .GetMethod("Build")
+ .GetRuntimeMethod("Build", new Type[0])
.MakeGenericMethod(type)
.Invoke(transformBuilder, new object[0]) as Func;
diff --git a/Source/Tx.Core/Csv/CsvExtensions.cs b/Source/Tx.Core/Csv/CsvExtensions.cs
index d90f13c5..d5fc857e 100644
--- a/Source/Tx.Core/Csv/CsvExtensions.cs
+++ b/Source/Tx.Core/Csv/CsvExtensions.cs
@@ -2,6 +2,7 @@
using System.Collections;
using System.IO;
+using System.Reflection;
namespace System.Reactive
{
@@ -17,9 +18,9 @@ public static IDisposable ToTsvFile(this IObservable source, string filePa
return source.Subscribe(new TextFileWriter("\t", filePath));
}
- class TextFileWriter : IObserver, IDisposable
+ internal sealed class TextFileWriter : IObserver, IDisposable
{
- private string _separator;
+ private readonly string _separator;
private StreamWriter _writer;
private bool _wroteHeader = false;
@@ -34,7 +35,7 @@ public TextFileWriter(string separator, string filePath)
///
public void OnCompleted()
{
- _writer.Close();
+ _writer.Dispose();
}
///
@@ -59,7 +60,7 @@ public void OnNext(T value)
}
bool isFirst = true;
- foreach (var p in typeof(T).GetProperties())
+ foreach (var p in typeof(T).GetTypeInfo().DeclaredProperties)
{
if (isFirst)
isFirst = false;
@@ -90,7 +91,7 @@ public void Dispose()
void WriteHeader(T firstValue)
{
bool isFirst = true;
- foreach (var p in typeof(T).GetProperties())
+ foreach (var p in typeof(T).GetTypeInfo().DeclaredProperties)
{
if (isFirst)
isFirst = false;
diff --git a/Source/Tx.Core/Csv/CsvObservable.cs b/Source/Tx.Core/Csv/CsvObservable.cs
index 38b8371f..69460fb2 100644
--- a/Source/Tx.Core/Csv/CsvObservable.cs
+++ b/Source/Tx.Core/Csv/CsvObservable.cs
@@ -37,7 +37,8 @@ private IEnumerable ReadRecords(string fileName)
{
var stringBuilder = new StringBuilder();
- using (var reader = new StreamReader(fileName))
+ using(var stream = File.OpenRead(fileName))
+ using (var reader = new StreamReader(stream))
{
ReadOnlyCollection header;
if (reader.Peek() >= 0)
diff --git a/Source/Tx.Core/Csv/CsvRecordTypeMap.cs b/Source/Tx.Core/Csv/CsvRecordTypeMap.cs
index 6c59f5d2..e3988709 100644
--- a/Source/Tx.Core/Csv/CsvRecordTypeMap.cs
+++ b/Source/Tx.Core/Csv/CsvRecordTypeMap.cs
@@ -42,7 +42,7 @@ public Func GetTransform(Type outputType)
{
if (outputType == null)
{
- throw new ArgumentNullException("outputType");
+ throw new ArgumentNullException(nameof(outputType));
}
KeyValuePair> value;
diff --git a/Source/Tx.Core/CustomAttributeProviderExtensions.cs b/Source/Tx.Core/CustomAttributeProviderExtensions.cs
deleted file mode 100644
index 218a838b..00000000
--- a/Source/Tx.Core/CustomAttributeProviderExtensions.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
-
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-
-namespace System.Reactive
-{
- public static class CustomAttributeProviderExtensions
- {
- public static TAttribute GetAttribute(this ICustomAttributeProvider provider)
- {
- object[] attributes = provider.GetCustomAttributes(typeof (TAttribute), false);
- if (attributes.Length == 0)
- return default(TAttribute);
-
- return (TAttribute) attributes[0];
- }
-
- public static IEnumerable GetAttributes(this ICustomAttributeProvider provider)
- {
- return (provider.GetCustomAttributes(typeof (TAttribute), false)).Cast();
- }
- }
-}
\ No newline at end of file
diff --git a/Source/Tx.Core/Demultiplexor.cs b/Source/Tx.Core/Demultiplexor.cs
index 40ba7502..873e61d5 100644
--- a/Source/Tx.Core/Demultiplexor.cs
+++ b/Source/Tx.Core/Demultiplexor.cs
@@ -4,6 +4,7 @@
using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Subjects;
+using System.Reflection;
namespace System.Reactive
{
@@ -82,16 +83,16 @@ public IObservable GetObservable()
return output;
}
- private List GetTypes(Type inputType)
+ private static List GetTypes(Type inputType)
{
var typeList = new List();
var temp = inputType;
while (temp != typeof(object))
{
typeList.Add(temp);
- temp = temp.BaseType;
+ temp = temp.GetTypeInfo().BaseType;
}
- typeList.AddRange(inputType.GetInterfaces());
+ typeList.AddRange(inputType.GetTypeInfo().ImplementedInterfaces);
return typeList;
}
@@ -106,7 +107,7 @@ private void RefreshKnownOutputMappings(Type outputType)
}
}
- private class OutputSubject : ISubject