From 2e7673b3afdcca4794476993b16959f4836b9855 Mon Sep 17 00:00:00 2001 From: Nicholas Blumhardt Date: Tue, 21 Jul 2015 05:44:07 +1000 Subject: [PATCH] Convert to VS2015/DNX; .NET 4.0 build still causing some release build problems around async. --- Serilog-net40.sln | 34 - Serilog-vs2015.sln | 318 ----- Serilog.sln | 51 +- global.json | 6 +- ...rConfigurationFullNetFxExtensions-net40.cs | 279 ---- src/Serilog.FullNetFx/Project.json | 41 - .../Properties/AssemblyInfo.cs | 16 - .../Serilog.FullNetFx-aspnetcore50.kproj | 23 - .../Serilog.FullNetFx-net40.csproj | 93 -- .../Serilog.FullNetFx.csproj | 87 -- .../PeriodicBatchingSink-net40.cs | 208 --- .../SystemConsole/ColoredConsoleSink-net40.cs | 170 --- .../LoggerSettingsConfiguration-net40.cs | 46 - .../Context/ImmutableStack.cs | 2 +- .../Context/LogContext.cs | 2 +- .../Enrichers/LogContextEnricher.cs | 2 +- .../Enrichers/MachineNameEnricher.cs | 4 +- .../Enrichers/ProcessIdEnricher.cs | 7 +- .../Enrichers/ThreadIdEnricher.cs | 2 + src/Serilog/Events/DictionaryValue-net40.cs | 71 - src/Serilog/Events/DictionaryValue.cs | 10 +- src/Serilog/Events/LogEvent-net40.cs | 147 -- src/Serilog/Events/LogEvent.cs | 8 +- src/Serilog/Events/MessageTemplate-net40.cs | 157 -- src/Serilog/Events/MessageTemplate.cs | 10 +- src/Serilog/Events/SequenceValue-net40.cs | 70 - src/Serilog/Events/SequenceValue.cs | 8 +- src/Serilog/Events/StructureValue-net40.cs | 99 -- src/Serilog/Events/StructureValue.cs | 8 +- .../LogEventPropertyMessageValue-net40.cs | 38 - .../Display/LogEventPropertyMessageValue.cs | 11 +- .../Display/OutputProperties-net40.cs | 77 - .../Formatting/Display/OutputProperties.cs | 8 +- .../Formatting/Json/JsonFormatter-net40.cs | 463 ------ src/Serilog/Formatting/Json/JsonFormatter.cs | 19 +- .../LoggerConfigurationFullNetFxExtensions.cs | 13 +- .../Parameters/GetablePropertyFinder.cs | 11 +- .../PropertyValueConverter-net40.cs | 204 --- .../Parameters/PropertyValueConverter.cs | 23 +- .../Parsing/MessageTemplateToken-net40.cs | 59 - src/Serilog/Parsing/MessageTemplateToken.cs | 10 +- src/Serilog/Parsing/PropertyToken-net40.cs | 216 --- src/Serilog/Parsing/PropertyToken.cs | 9 +- src/Serilog/Parsing/TextToken-net40.cs | 106 -- src/Serilog/Parsing/TextToken.cs | 10 +- .../TypeExtensions-net40.cs} | 31 +- src/Serilog/Platform/TypeInfo-net40.cs | 98 ++ .../Policies/EnumScalarConversionPolicy.cs | 4 + .../NullableScalarConversionPolicy-net40.cs | 39 - .../NullableScalarConversionPolicy.cs | 17 +- src/Serilog/Project.json | 101 +- src/Serilog/Serilog-aspnetcore50.kproj | 23 - src/Serilog/Serilog-net40.csproj | 136 -- src/Serilog/Serilog.csproj | 137 -- src/Serilog/Serilog.nuspec | 31 - src/Serilog/Serilog.xproj | 24 + .../AppSettings/AppSettingsSettings.cs | 2 + .../KeyValuePairSettings-net40.cs | 171 --- .../KeyValuePairs/KeyValuePairSettings.cs | 24 +- .../ParameterInfoExtensions-40.cs | 15 - .../KeyValuePairs/TypeExtensions-40.cs | 77 - .../DiagnosticTrace/DiagnosticTraceSink.cs | 2 + .../IOFile/CharacterCountLimitedTextWriter.cs | 4 +- .../Sinks/IOFile/FileSink.cs | 2 + .../Sinks/IOFile/NullSink.cs | 0 .../Sinks/Observable/ObservableSink-net40.cs | 113 -- .../Sinks/Observable/ObservableSink.cs | 4 + .../BatchedConnectionStatus.cs | 4 +- .../PeriodicBatching/PeriodicBatchingSink.cs | 22 +- .../Sinks/RollingFile/Clock.cs | 0 .../Sinks/RollingFile/RollingFileSink.cs | 2 + .../Sinks/RollingFile/RollingLogFile.cs | 0 .../Sinks/RollingFile/TemplatedPathRoller.cs | 8 +- .../Sinks/SystemConsole/ColoredConsoleSink.cs | 12 +- .../Sinks/SystemConsole/ConsoleSink.cs | 2 + src/Serilog/project.lock.json | 1268 +++++++++++++++++ test/Serilog.MsTests/Serilog.MsTests.csproj | 10 - .../Serilog.PerformanceTests.csproj | 10 - .../Serilog.SmokeTest.csproj | 10 - .../Serilog.aspnetcore50.SmokeTest.kproj | 17 - test/Serilog.SmokeTest/project.json | 16 - test/Serilog.Tests/Serilog.Tests.csproj | 10 - 82 files changed, 1725 insertions(+), 3977 deletions(-) delete mode 100644 Serilog-net40.sln delete mode 100644 Serilog-vs2015.sln delete mode 100644 src/Serilog.FullNetFx/LoggerConfigurationFullNetFxExtensions-net40.cs delete mode 100644 src/Serilog.FullNetFx/Project.json delete mode 100644 src/Serilog.FullNetFx/Properties/AssemblyInfo.cs delete mode 100644 src/Serilog.FullNetFx/Serilog.FullNetFx-aspnetcore50.kproj delete mode 100644 src/Serilog.FullNetFx/Serilog.FullNetFx-net40.csproj delete mode 100644 src/Serilog.FullNetFx/Serilog.FullNetFx.csproj delete mode 100644 src/Serilog.FullNetFx/Sinks/PeriodicBatching/PeriodicBatchingSink-net40.cs delete mode 100644 src/Serilog.FullNetFx/Sinks/SystemConsole/ColoredConsoleSink-net40.cs delete mode 100644 src/Serilog/Configuration/LoggerSettingsConfiguration-net40.cs rename src/{Serilog.FullNetFx => Serilog}/Context/ImmutableStack.cs (98%) rename src/{Serilog.FullNetFx => Serilog}/Context/LogContext.cs (99%) rename src/{Serilog.FullNetFx => Serilog}/Enrichers/LogContextEnricher.cs (96%) rename src/{Serilog.FullNetFx => Serilog}/Enrichers/MachineNameEnricher.cs (97%) rename src/{Serilog.FullNetFx => Serilog}/Enrichers/ProcessIdEnricher.cs (89%) rename src/{Serilog.FullNetFx => Serilog}/Enrichers/ThreadIdEnricher.cs (98%) delete mode 100644 src/Serilog/Events/DictionaryValue-net40.cs delete mode 100644 src/Serilog/Events/LogEvent-net40.cs delete mode 100644 src/Serilog/Events/MessageTemplate-net40.cs delete mode 100644 src/Serilog/Events/SequenceValue-net40.cs delete mode 100644 src/Serilog/Events/StructureValue-net40.cs delete mode 100644 src/Serilog/Formatting/Display/LogEventPropertyMessageValue-net40.cs delete mode 100644 src/Serilog/Formatting/Display/OutputProperties-net40.cs delete mode 100644 src/Serilog/Formatting/Json/JsonFormatter-net40.cs rename src/{Serilog.FullNetFx => Serilog}/LoggerConfigurationFullNetFxExtensions.cs (99%) delete mode 100644 src/Serilog/Parameters/PropertyValueConverter-net40.cs delete mode 100644 src/Serilog/Parsing/MessageTemplateToken-net40.cs delete mode 100644 src/Serilog/Parsing/PropertyToken-net40.cs delete mode 100644 src/Serilog/Parsing/TextToken-net40.cs rename src/Serilog/{Policies/EnumScalarConversionPolicy-net40.cs => Platform/TypeExtensions-net40.cs} (53%) create mode 100644 src/Serilog/Platform/TypeInfo-net40.cs delete mode 100644 src/Serilog/Policies/NullableScalarConversionPolicy-net40.cs delete mode 100644 src/Serilog/Serilog-aspnetcore50.kproj delete mode 100644 src/Serilog/Serilog-net40.csproj delete mode 100644 src/Serilog/Serilog.csproj delete mode 100644 src/Serilog/Serilog.nuspec create mode 100644 src/Serilog/Serilog.xproj rename src/{Serilog.FullNetFx => Serilog}/Settings/AppSettings/AppSettingsSettings.cs (97%) delete mode 100644 src/Serilog/Settings/KeyValuePairs/KeyValuePairSettings-net40.cs delete mode 100644 src/Serilog/Settings/KeyValuePairs/ParameterInfoExtensions-40.cs delete mode 100644 src/Serilog/Settings/KeyValuePairs/TypeExtensions-40.cs rename src/{Serilog.FullNetFx => Serilog}/Sinks/DiagnosticTrace/DiagnosticTraceSink.cs (98%) rename src/{Serilog.FullNetFx => Serilog}/Sinks/IOFile/CharacterCountLimitedTextWriter.cs (99%) rename src/{Serilog.FullNetFx => Serilog}/Sinks/IOFile/FileSink.cs (99%) rename src/{Serilog.FullNetFx => Serilog}/Sinks/IOFile/NullSink.cs (100%) delete mode 100644 src/Serilog/Sinks/Observable/ObservableSink-net40.cs rename src/{Serilog.FullNetFx => Serilog}/Sinks/PeriodicBatching/BatchedConnectionStatus.cs (99%) rename src/{Serilog.FullNetFx => Serilog}/Sinks/PeriodicBatching/PeriodicBatchingSink.cs (93%) rename src/{Serilog.FullNetFx => Serilog}/Sinks/RollingFile/Clock.cs (100%) rename src/{Serilog.FullNetFx => Serilog}/Sinks/RollingFile/RollingFileSink.cs (99%) rename src/{Serilog.FullNetFx => Serilog}/Sinks/RollingFile/RollingLogFile.cs (100%) rename src/{Serilog.FullNetFx => Serilog}/Sinks/RollingFile/TemplatedPathRoller.cs (99%) rename src/{Serilog.FullNetFx => Serilog}/Sinks/SystemConsole/ColoredConsoleSink.cs (94%) rename src/{Serilog.FullNetFx => Serilog}/Sinks/SystemConsole/ConsoleSink.cs (98%) create mode 100644 src/Serilog/project.lock.json delete mode 100644 test/Serilog.SmokeTest/Serilog.aspnetcore50.SmokeTest.kproj delete mode 100644 test/Serilog.SmokeTest/project.json diff --git a/Serilog-net40.sln b/Serilog-net40.sln deleted file mode 100644 index 3f67c8365..000000000 --- a/Serilog-net40.sln +++ /dev/null @@ -1,34 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog-net40", "src\Serilog\Serilog-net40.csproj", "{0915DBD9-0F7C-4439-8D9E-74C3D579B219}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.FullNetFx-net40", "src\Serilog.FullNetFx\Serilog.FullNetFx-net40.csproj", "{7A9E1095-167D-402A-B43D-B36B97FF183D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Tests-net40", "test\Serilog.Tests\Serilog.Tests-net40.csproj", "{D5648551-D19D-41E3-9FC1-E74B111EEF41}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0915DBD9-0F7C-4439-8D9E-74C3D579B219}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0915DBD9-0F7C-4439-8D9E-74C3D579B219}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0915DBD9-0F7C-4439-8D9E-74C3D579B219}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0915DBD9-0F7C-4439-8D9E-74C3D579B219}.Release|Any CPU.Build.0 = Release|Any CPU - {7A9E1095-167D-402A-B43D-B36B97FF183D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7A9E1095-167D-402A-B43D-B36B97FF183D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7A9E1095-167D-402A-B43D-B36B97FF183D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7A9E1095-167D-402A-B43D-B36B97FF183D}.Release|Any CPU.Build.0 = Release|Any CPU - {D5648551-D19D-41E3-9FC1-E74B111EEF41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D5648551-D19D-41E3-9FC1-E74B111EEF41}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D5648551-D19D-41E3-9FC1-E74B111EEF41}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D5648551-D19D-41E3-9FC1-E74B111EEF41}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Serilog-vs2015.sln b/Serilog-vs2015.sln deleted file mode 100644 index 62bd64a4c..000000000 --- a/Serilog-vs2015.sln +++ /dev/null @@ -1,318 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.22310.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{037440DE-440B-4129-9F7A-09B42D00397E}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0D135C0C-A60B-454A-A2F4-CD74A30E04B0}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5E1-DEB9-4A04-8BAB-24EC7240ADAF}" - ProjectSection(SolutionItems) = preProject - README.md = README.md - assets\Serilog.snk = assets\Serilog.snk - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog", "src\Serilog\Serilog.csproj", "{0915DBD9-0F7C-4439-8D9E-74C3D579B219}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Tests", "test\Serilog.Tests\Serilog.Tests.csproj", "{D5648551-D19D-41E3-9FC1-E74B111EEF41}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.CouchDB", "src\Serilog.Sinks.CouchDB\Serilog.Sinks.CouchDB.csproj", "{E728D183-07C4-49F7-8C4C-D76D70C8F3B4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.MongoDB", "src\Serilog.Sinks.MongoDB\Serilog.Sinks.MongoDB.csproj", "{8164BDE4-48FE-4A81-B33E-FEE348904BB8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.FullNetFx", "src\Serilog.FullNetFx\Serilog.FullNetFx.csproj", "{7A9E1095-167D-402A-B43D-B36B97FF183D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.AzureTableStorage", "src\Serilog.Sinks.AzureTableStorage\Serilog.Sinks.AzureTableStorage.csproj", "{DA0432BD-FDA0-40C9-BCF1-A38F601600D3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.RavenDB", "src\Serilog.Sinks.RavenDB\Serilog.Sinks.RavenDB.csproj", "{EEDEA9EA-7742-4EDF-A848-B6199D1030F7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.RavenDB.Tests", "test\Serilog.Sinks.RavenDB.Tests\Serilog.Sinks.RavenDB.Tests.csproj", "{CE37740B-0B12-4974-BE44-A64E85C9ED9D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.PerformanceTests", "test\Serilog.PerformanceTests\Serilog.PerformanceTests.csproj", "{6A6504BF-CD5B-4C9E-88EB-5BD71CE3106A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.Log4Net", "src\Serilog.Sinks.Log4Net\Serilog.Sinks.Log4Net.csproj", "{83EA2B05-FF47-40C8-92C3-1F58AEEC7CE0}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.Glimpse", "src\Serilog.Sinks.Glimpse\Serilog.Sinks.Glimpse.csproj", "{48E6827A-6878-4764-A957-7542891E7F5B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extras.Topshelf", "src\Serilog.Extras.TopShelf\Serilog.Extras.Topshelf.csproj", "{1C0FE823-FCCB-46B4-B76C-9661295A312A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extras.Web", "src\Serilog.Extras.Web\Serilog.Extras.Web.csproj", "{13CEC8DD-6087-4FEE-AEC1-0511B8959CCD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.SignalR", "src\Serilog.Sinks.SignalR\Serilog.Sinks.SignalR.csproj", "{0D51B456-A1B0-4048-9E90-E98CEB95E976}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.Email", "src\Serilog.Sinks.Email\Serilog.Sinks.Email.csproj", "{F3B80F77-155C-434D-9865-2E522D072972}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.EventLog", "src\Serilog.Sinks.EventLog\Serilog.Sinks.EventLog.csproj", "{EEA8B8EB-0FE6-44C2-9D10-02B7E3DEAD06}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.ElmahIO", "src\Serilog.Sinks.ElmahIO\Serilog.Sinks.ElmahIO.csproj", "{830BBD7E-6068-4D97-B6BF-59051FC2B6B1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.Loggr", "src\Serilog.Sinks.Loggr\Serilog.Sinks.Loggr.csproj", "{C51F89BC-9DC1-4A13-98E2-A2ED09FD9F0D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.ElasticSearch", "src\Serilog.Sinks.ElasticSearch\Serilog.Sinks.ElasticSearch.csproj", "{E12881F7-B522-4E42-BCCC-4A81F42F8D8B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.Loggly", "src\Serilog.Sinks.Loggly\Serilog.Sinks.Loggly.csproj", "{E3264D8A-63D7-40AB-B67B-BF55E53DC9C4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extras.Timing", "src\Serilog.Extras.Timing\Serilog.Extras.Timing.csproj", "{264C91AF-6631-4E04-A2AC-E32E88055228}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extras.AppSettings", "src\Serilog.Extras.AppSettings\Serilog.Extras.AppSettings.csproj", "{21CAF132-BBAB-41FD-A018-EB9AE54822ED}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.Logentries", "src\Serilog.Sinks.Logentries\Serilog.Sinks.Logentries.csproj", "{7C03FE5B-426F-494C-9B7E-B23F060AB5D3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.Couchbase", "src\Serilog.Sinks.Couchbase\Serilog.Sinks.Couchbase.csproj", "{104D5B1E-47BE-4739-A183-08C35BF4D38D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extras.MSOwin", "src\Serilog.Extras.MSOwin\Serilog.Extras.MSOwin.csproj", "{FDCEBC10-F403-4DDD-8594-DE6D7DD543AF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extras.MSOwin.Tests", "test\Serilog.Extras.MSOwin.Tests\Serilog.Extras.MSOwin.Tests.csproj", "{4F81EDAE-2E06-4024-925A-E495C852BDCF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.MSSqlServer", "src\Serilog.Sinks.MSSqlServer\Serilog.Sinks.MSSqlServer.csproj", "{31C64BE9-4EF6-42D5-A811-D7D24613EEF6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.Raygun", "src\Serilog.Sinks.Raygun\Serilog.Sinks.Raygun.csproj", "{B4EEC1AD-6E2B-49F6-A4C0-A9D39E9C4EFA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.NLog", "src\Serilog.Sinks.NLog\Serilog.Sinks.NLog.csproj", "{9A3994D6-4CE1-4AF9-A43D-2AF324075B21}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.SmokeTest", "test\Serilog.SmokeTest\Serilog.SmokeTest.csproj", "{58563C46-B781-4799-ABD5-9745F94478FD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.ApplicationInsights", "src\Serilog.Sinks.ApplicationInsights\Serilog.Sinks.ApplicationInsights.csproj", "{3F08FA19-8D51-427D-8CDA-965CF79B9ECF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extras.AppSettings.Tests", "test\Serilog.Extras.AppSettings.Tests\Serilog.Extras.AppSettings.Tests.csproj", "{67398D2A-0829-4373-ABC5-2161FEB28A05}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extras.Attributed", "src\Serilog.Extras.Attributed\Serilog.Extras.Attributed.csproj", "{A79F906E-0298-49DC-93EC-CE4F1F5D13E2}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extras.Attributed.Tests", "test\Serilog.Extras.Attributed.Tests\Serilog.Extras.Attributed.Tests.csproj", "{182ECDA3-A97D-4BB6-BC6F-60A137478B92}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extras.DestructureByIgnoring", "src\Serilog.Extras.DestructureByIgnoring\Serilog.Extras.DestructureByIgnoring.csproj", "{C5CC62F4-310F-495C-96EA-B8E5D26F8D57}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extras.DestructureByIgnoring.Tests", "test\Serilog.Extras.DestructureByIgnoring.Tests\Serilog.Extras.DestructureByIgnoring.Tests.csproj", "{977E42C3-D501-4730-98FF-525B753B1E3A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.Seq", "src\Serilog.Sinks.Seq\Serilog.Sinks.Seq.csproj", "{B6A720E1-732B-4B8B-868B-5914AF85983C}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog-aspnetcore50", "src\Serilog\Serilog-aspnetcore50.kproj", "{3892F3AE-4E82-4134-B4ED-2B28E5B82451}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.FullNetFx-aspnetcore50", "src\Serilog.FullNetFx\Serilog.FullNetFx-aspnetcore50.kproj", "{370C3957-E1F5-4818-B391-8DCA083D7A9F}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.aspnetcore50.SmokeTest", "test\Serilog.SmokeTest\Serilog.aspnetcore50.SmokeTest.kproj", "{CE11BE0D-F4F8-4D34-AC74-F7E9AB344EC3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0915DBD9-0F7C-4439-8D9E-74C3D579B219}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0915DBD9-0F7C-4439-8D9E-74C3D579B219}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0915DBD9-0F7C-4439-8D9E-74C3D579B219}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0915DBD9-0F7C-4439-8D9E-74C3D579B219}.Release|Any CPU.Build.0 = Release|Any CPU - {D5648551-D19D-41E3-9FC1-E74B111EEF41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D5648551-D19D-41E3-9FC1-E74B111EEF41}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D5648551-D19D-41E3-9FC1-E74B111EEF41}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D5648551-D19D-41E3-9FC1-E74B111EEF41}.Release|Any CPU.Build.0 = Release|Any CPU - {E728D183-07C4-49F7-8C4C-D76D70C8F3B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E728D183-07C4-49F7-8C4C-D76D70C8F3B4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E728D183-07C4-49F7-8C4C-D76D70C8F3B4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E728D183-07C4-49F7-8C4C-D76D70C8F3B4}.Release|Any CPU.Build.0 = Release|Any CPU - {8164BDE4-48FE-4A81-B33E-FEE348904BB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8164BDE4-48FE-4A81-B33E-FEE348904BB8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8164BDE4-48FE-4A81-B33E-FEE348904BB8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8164BDE4-48FE-4A81-B33E-FEE348904BB8}.Release|Any CPU.Build.0 = Release|Any CPU - {7A9E1095-167D-402A-B43D-B36B97FF183D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7A9E1095-167D-402A-B43D-B36B97FF183D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7A9E1095-167D-402A-B43D-B36B97FF183D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7A9E1095-167D-402A-B43D-B36B97FF183D}.Release|Any CPU.Build.0 = Release|Any CPU - {DA0432BD-FDA0-40C9-BCF1-A38F601600D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DA0432BD-FDA0-40C9-BCF1-A38F601600D3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DA0432BD-FDA0-40C9-BCF1-A38F601600D3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DA0432BD-FDA0-40C9-BCF1-A38F601600D3}.Release|Any CPU.Build.0 = Release|Any CPU - {EEDEA9EA-7742-4EDF-A848-B6199D1030F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EEDEA9EA-7742-4EDF-A848-B6199D1030F7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EEDEA9EA-7742-4EDF-A848-B6199D1030F7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EEDEA9EA-7742-4EDF-A848-B6199D1030F7}.Release|Any CPU.Build.0 = Release|Any CPU - {CE37740B-0B12-4974-BE44-A64E85C9ED9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CE37740B-0B12-4974-BE44-A64E85C9ED9D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CE37740B-0B12-4974-BE44-A64E85C9ED9D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CE37740B-0B12-4974-BE44-A64E85C9ED9D}.Release|Any CPU.Build.0 = Release|Any CPU - {6A6504BF-CD5B-4C9E-88EB-5BD71CE3106A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6A6504BF-CD5B-4C9E-88EB-5BD71CE3106A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6A6504BF-CD5B-4C9E-88EB-5BD71CE3106A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6A6504BF-CD5B-4C9E-88EB-5BD71CE3106A}.Release|Any CPU.Build.0 = Release|Any CPU - {83EA2B05-FF47-40C8-92C3-1F58AEEC7CE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {83EA2B05-FF47-40C8-92C3-1F58AEEC7CE0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {83EA2B05-FF47-40C8-92C3-1F58AEEC7CE0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {83EA2B05-FF47-40C8-92C3-1F58AEEC7CE0}.Release|Any CPU.Build.0 = Release|Any CPU - {48E6827A-6878-4764-A957-7542891E7F5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {48E6827A-6878-4764-A957-7542891E7F5B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {48E6827A-6878-4764-A957-7542891E7F5B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {48E6827A-6878-4764-A957-7542891E7F5B}.Release|Any CPU.Build.0 = Release|Any CPU - {1C0FE823-FCCB-46B4-B76C-9661295A312A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1C0FE823-FCCB-46B4-B76C-9661295A312A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1C0FE823-FCCB-46B4-B76C-9661295A312A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1C0FE823-FCCB-46B4-B76C-9661295A312A}.Release|Any CPU.Build.0 = Release|Any CPU - {13CEC8DD-6087-4FEE-AEC1-0511B8959CCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {13CEC8DD-6087-4FEE-AEC1-0511B8959CCD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {13CEC8DD-6087-4FEE-AEC1-0511B8959CCD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {13CEC8DD-6087-4FEE-AEC1-0511B8959CCD}.Release|Any CPU.Build.0 = Release|Any CPU - {0D51B456-A1B0-4048-9E90-E98CEB95E976}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0D51B456-A1B0-4048-9E90-E98CEB95E976}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0D51B456-A1B0-4048-9E90-E98CEB95E976}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0D51B456-A1B0-4048-9E90-E98CEB95E976}.Release|Any CPU.Build.0 = Release|Any CPU - {F3B80F77-155C-434D-9865-2E522D072972}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F3B80F77-155C-434D-9865-2E522D072972}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F3B80F77-155C-434D-9865-2E522D072972}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F3B80F77-155C-434D-9865-2E522D072972}.Release|Any CPU.Build.0 = Release|Any CPU - {EEA8B8EB-0FE6-44C2-9D10-02B7E3DEAD06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EEA8B8EB-0FE6-44C2-9D10-02B7E3DEAD06}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EEA8B8EB-0FE6-44C2-9D10-02B7E3DEAD06}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EEA8B8EB-0FE6-44C2-9D10-02B7E3DEAD06}.Release|Any CPU.Build.0 = Release|Any CPU - {830BBD7E-6068-4D97-B6BF-59051FC2B6B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {830BBD7E-6068-4D97-B6BF-59051FC2B6B1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {830BBD7E-6068-4D97-B6BF-59051FC2B6B1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {830BBD7E-6068-4D97-B6BF-59051FC2B6B1}.Release|Any CPU.Build.0 = Release|Any CPU - {C51F89BC-9DC1-4A13-98E2-A2ED09FD9F0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C51F89BC-9DC1-4A13-98E2-A2ED09FD9F0D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C51F89BC-9DC1-4A13-98E2-A2ED09FD9F0D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C51F89BC-9DC1-4A13-98E2-A2ED09FD9F0D}.Release|Any CPU.Build.0 = Release|Any CPU - {E12881F7-B522-4E42-BCCC-4A81F42F8D8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E12881F7-B522-4E42-BCCC-4A81F42F8D8B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E12881F7-B522-4E42-BCCC-4A81F42F8D8B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E12881F7-B522-4E42-BCCC-4A81F42F8D8B}.Release|Any CPU.Build.0 = Release|Any CPU - {E3264D8A-63D7-40AB-B67B-BF55E53DC9C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E3264D8A-63D7-40AB-B67B-BF55E53DC9C4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E3264D8A-63D7-40AB-B67B-BF55E53DC9C4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E3264D8A-63D7-40AB-B67B-BF55E53DC9C4}.Release|Any CPU.Build.0 = Release|Any CPU - {264C91AF-6631-4E04-A2AC-E32E88055228}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {264C91AF-6631-4E04-A2AC-E32E88055228}.Debug|Any CPU.Build.0 = Debug|Any CPU - {264C91AF-6631-4E04-A2AC-E32E88055228}.Release|Any CPU.ActiveCfg = Release|Any CPU - {264C91AF-6631-4E04-A2AC-E32E88055228}.Release|Any CPU.Build.0 = Release|Any CPU - {21CAF132-BBAB-41FD-A018-EB9AE54822ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {21CAF132-BBAB-41FD-A018-EB9AE54822ED}.Debug|Any CPU.Build.0 = Debug|Any CPU - {21CAF132-BBAB-41FD-A018-EB9AE54822ED}.Release|Any CPU.ActiveCfg = Release|Any CPU - {21CAF132-BBAB-41FD-A018-EB9AE54822ED}.Release|Any CPU.Build.0 = Release|Any CPU - {7C03FE5B-426F-494C-9B7E-B23F060AB5D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7C03FE5B-426F-494C-9B7E-B23F060AB5D3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7C03FE5B-426F-494C-9B7E-B23F060AB5D3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7C03FE5B-426F-494C-9B7E-B23F060AB5D3}.Release|Any CPU.Build.0 = Release|Any CPU - {104D5B1E-47BE-4739-A183-08C35BF4D38D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {104D5B1E-47BE-4739-A183-08C35BF4D38D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {104D5B1E-47BE-4739-A183-08C35BF4D38D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {104D5B1E-47BE-4739-A183-08C35BF4D38D}.Release|Any CPU.Build.0 = Release|Any CPU - {FDCEBC10-F403-4DDD-8594-DE6D7DD543AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FDCEBC10-F403-4DDD-8594-DE6D7DD543AF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FDCEBC10-F403-4DDD-8594-DE6D7DD543AF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FDCEBC10-F403-4DDD-8594-DE6D7DD543AF}.Release|Any CPU.Build.0 = Release|Any CPU - {4F81EDAE-2E06-4024-925A-E495C852BDCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4F81EDAE-2E06-4024-925A-E495C852BDCF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4F81EDAE-2E06-4024-925A-E495C852BDCF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4F81EDAE-2E06-4024-925A-E495C852BDCF}.Release|Any CPU.Build.0 = Release|Any CPU - {31C64BE9-4EF6-42D5-A811-D7D24613EEF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {31C64BE9-4EF6-42D5-A811-D7D24613EEF6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {31C64BE9-4EF6-42D5-A811-D7D24613EEF6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {31C64BE9-4EF6-42D5-A811-D7D24613EEF6}.Release|Any CPU.Build.0 = Release|Any CPU - {B4EEC1AD-6E2B-49F6-A4C0-A9D39E9C4EFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B4EEC1AD-6E2B-49F6-A4C0-A9D39E9C4EFA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B4EEC1AD-6E2B-49F6-A4C0-A9D39E9C4EFA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B4EEC1AD-6E2B-49F6-A4C0-A9D39E9C4EFA}.Release|Any CPU.Build.0 = Release|Any CPU - {9A3994D6-4CE1-4AF9-A43D-2AF324075B21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9A3994D6-4CE1-4AF9-A43D-2AF324075B21}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9A3994D6-4CE1-4AF9-A43D-2AF324075B21}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9A3994D6-4CE1-4AF9-A43D-2AF324075B21}.Release|Any CPU.Build.0 = Release|Any CPU - {58563C46-B781-4799-ABD5-9745F94478FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {58563C46-B781-4799-ABD5-9745F94478FD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {58563C46-B781-4799-ABD5-9745F94478FD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {58563C46-B781-4799-ABD5-9745F94478FD}.Release|Any CPU.Build.0 = Release|Any CPU - {3F08FA19-8D51-427D-8CDA-965CF79B9ECF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3F08FA19-8D51-427D-8CDA-965CF79B9ECF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3F08FA19-8D51-427D-8CDA-965CF79B9ECF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3F08FA19-8D51-427D-8CDA-965CF79B9ECF}.Release|Any CPU.Build.0 = Release|Any CPU - {67398D2A-0829-4373-ABC5-2161FEB28A05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {67398D2A-0829-4373-ABC5-2161FEB28A05}.Debug|Any CPU.Build.0 = Debug|Any CPU - {67398D2A-0829-4373-ABC5-2161FEB28A05}.Release|Any CPU.ActiveCfg = Release|Any CPU - {67398D2A-0829-4373-ABC5-2161FEB28A05}.Release|Any CPU.Build.0 = Release|Any CPU - {A79F906E-0298-49DC-93EC-CE4F1F5D13E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A79F906E-0298-49DC-93EC-CE4F1F5D13E2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A79F906E-0298-49DC-93EC-CE4F1F5D13E2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A79F906E-0298-49DC-93EC-CE4F1F5D13E2}.Release|Any CPU.Build.0 = Release|Any CPU - {182ECDA3-A97D-4BB6-BC6F-60A137478B92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {182ECDA3-A97D-4BB6-BC6F-60A137478B92}.Debug|Any CPU.Build.0 = Debug|Any CPU - {182ECDA3-A97D-4BB6-BC6F-60A137478B92}.Release|Any CPU.ActiveCfg = Release|Any CPU - {182ECDA3-A97D-4BB6-BC6F-60A137478B92}.Release|Any CPU.Build.0 = Release|Any CPU - {C5CC62F4-310F-495C-96EA-B8E5D26F8D57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C5CC62F4-310F-495C-96EA-B8E5D26F8D57}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C5CC62F4-310F-495C-96EA-B8E5D26F8D57}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C5CC62F4-310F-495C-96EA-B8E5D26F8D57}.Release|Any CPU.Build.0 = Release|Any CPU - {13771374-CF5A-4955-BCDB-EBEFE70944B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {13771374-CF5A-4955-BCDB-EBEFE70944B8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {13771374-CF5A-4955-BCDB-EBEFE70944B8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {13771374-CF5A-4955-BCDB-EBEFE70944B8}.Release|Any CPU.Build.0 = Release|Any CPU - {977E42C3-D501-4730-98FF-525B753B1E3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {977E42C3-D501-4730-98FF-525B753B1E3A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {977E42C3-D501-4730-98FF-525B753B1E3A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {977E42C3-D501-4730-98FF-525B753B1E3A}.Release|Any CPU.Build.0 = Release|Any CPU - {17DEED0F-F9CB-48FB-B4DC-53FB6AEE64D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {17DEED0F-F9CB-48FB-B4DC-53FB6AEE64D7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {17DEED0F-F9CB-48FB-B4DC-53FB6AEE64D7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {17DEED0F-F9CB-48FB-B4DC-53FB6AEE64D7}.Release|Any CPU.Build.0 = Release|Any CPU - {B6A720E1-732B-4B8B-868B-5914AF85983C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B6A720E1-732B-4B8B-868B-5914AF85983C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B6A720E1-732B-4B8B-868B-5914AF85983C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B6A720E1-732B-4B8B-868B-5914AF85983C}.Release|Any CPU.Build.0 = Release|Any CPU - {3892F3AE-4E82-4134-B4ED-2B28E5B82451}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3892F3AE-4E82-4134-B4ED-2B28E5B82451}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3892F3AE-4E82-4134-B4ED-2B28E5B82451}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3892F3AE-4E82-4134-B4ED-2B28E5B82451}.Release|Any CPU.Build.0 = Release|Any CPU - {370C3957-E1F5-4818-B391-8DCA083D7A9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {370C3957-E1F5-4818-B391-8DCA083D7A9F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {370C3957-E1F5-4818-B391-8DCA083D7A9F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {370C3957-E1F5-4818-B391-8DCA083D7A9F}.Release|Any CPU.Build.0 = Release|Any CPU - {CE11BE0D-F4F8-4D34-AC74-F7E9AB344EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CE11BE0D-F4F8-4D34-AC74-F7E9AB344EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CE11BE0D-F4F8-4D34-AC74-F7E9AB344EC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CE11BE0D-F4F8-4D34-AC74-F7E9AB344EC3}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {0915DBD9-0F7C-4439-8D9E-74C3D579B219} = {037440DE-440B-4129-9F7A-09B42D00397E} - {D5648551-D19D-41E3-9FC1-E74B111EEF41} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - {E728D183-07C4-49F7-8C4C-D76D70C8F3B4} = {037440DE-440B-4129-9F7A-09B42D00397E} - {8164BDE4-48FE-4A81-B33E-FEE348904BB8} = {037440DE-440B-4129-9F7A-09B42D00397E} - {7A9E1095-167D-402A-B43D-B36B97FF183D} = {037440DE-440B-4129-9F7A-09B42D00397E} - {DA0432BD-FDA0-40C9-BCF1-A38F601600D3} = {037440DE-440B-4129-9F7A-09B42D00397E} - {EEDEA9EA-7742-4EDF-A848-B6199D1030F7} = {037440DE-440B-4129-9F7A-09B42D00397E} - {CE37740B-0B12-4974-BE44-A64E85C9ED9D} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - {6A6504BF-CD5B-4C9E-88EB-5BD71CE3106A} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - {83EA2B05-FF47-40C8-92C3-1F58AEEC7CE0} = {037440DE-440B-4129-9F7A-09B42D00397E} - {48E6827A-6878-4764-A957-7542891E7F5B} = {037440DE-440B-4129-9F7A-09B42D00397E} - {1C0FE823-FCCB-46B4-B76C-9661295A312A} = {037440DE-440B-4129-9F7A-09B42D00397E} - {13CEC8DD-6087-4FEE-AEC1-0511B8959CCD} = {037440DE-440B-4129-9F7A-09B42D00397E} - {0D51B456-A1B0-4048-9E90-E98CEB95E976} = {037440DE-440B-4129-9F7A-09B42D00397E} - {F3B80F77-155C-434D-9865-2E522D072972} = {037440DE-440B-4129-9F7A-09B42D00397E} - {EEA8B8EB-0FE6-44C2-9D10-02B7E3DEAD06} = {037440DE-440B-4129-9F7A-09B42D00397E} - {830BBD7E-6068-4D97-B6BF-59051FC2B6B1} = {037440DE-440B-4129-9F7A-09B42D00397E} - {C51F89BC-9DC1-4A13-98E2-A2ED09FD9F0D} = {037440DE-440B-4129-9F7A-09B42D00397E} - {E12881F7-B522-4E42-BCCC-4A81F42F8D8B} = {037440DE-440B-4129-9F7A-09B42D00397E} - {E3264D8A-63D7-40AB-B67B-BF55E53DC9C4} = {037440DE-440B-4129-9F7A-09B42D00397E} - {264C91AF-6631-4E04-A2AC-E32E88055228} = {037440DE-440B-4129-9F7A-09B42D00397E} - {21CAF132-BBAB-41FD-A018-EB9AE54822ED} = {037440DE-440B-4129-9F7A-09B42D00397E} - {7C03FE5B-426F-494C-9B7E-B23F060AB5D3} = {037440DE-440B-4129-9F7A-09B42D00397E} - {104D5B1E-47BE-4739-A183-08C35BF4D38D} = {037440DE-440B-4129-9F7A-09B42D00397E} - {FDCEBC10-F403-4DDD-8594-DE6D7DD543AF} = {037440DE-440B-4129-9F7A-09B42D00397E} - {4F81EDAE-2E06-4024-925A-E495C852BDCF} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - {31C64BE9-4EF6-42D5-A811-D7D24613EEF6} = {037440DE-440B-4129-9F7A-09B42D00397E} - {B4EEC1AD-6E2B-49F6-A4C0-A9D39E9C4EFA} = {037440DE-440B-4129-9F7A-09B42D00397E} - {9A3994D6-4CE1-4AF9-A43D-2AF324075B21} = {037440DE-440B-4129-9F7A-09B42D00397E} - {58563C46-B781-4799-ABD5-9745F94478FD} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - {3F08FA19-8D51-427D-8CDA-965CF79B9ECF} = {037440DE-440B-4129-9F7A-09B42D00397E} - {67398D2A-0829-4373-ABC5-2161FEB28A05} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - {A79F906E-0298-49DC-93EC-CE4F1F5D13E2} = {037440DE-440B-4129-9F7A-09B42D00397E} - {182ECDA3-A97D-4BB6-BC6F-60A137478B92} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - {C5CC62F4-310F-495C-96EA-B8E5D26F8D57} = {037440DE-440B-4129-9F7A-09B42D00397E} - {13771374-CF5A-4955-BCDB-EBEFE70944B8} = {037440DE-440B-4129-9F7A-09B42D00397E} - {977E42C3-D501-4730-98FF-525B753B1E3A} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - {17DEED0F-F9CB-48FB-B4DC-53FB6AEE64D7} = {037440DE-440B-4129-9F7A-09B42D00397E} - {B6A720E1-732B-4B8B-868B-5914AF85983C} = {037440DE-440B-4129-9F7A-09B42D00397E} - {3892F3AE-4E82-4134-B4ED-2B28E5B82451} = {037440DE-440B-4129-9F7A-09B42D00397E} - {370C3957-E1F5-4818-B391-8DCA083D7A9F} = {037440DE-440B-4129-9F7A-09B42D00397E} - {CE11BE0D-F4F8-4D34-AC74-F7E9AB344EC3} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - EndGlobalSection -EndGlobal diff --git a/Serilog.sln b/Serilog.sln index 5da528f9e..9b0df01f5 100644 --- a/Serilog.sln +++ b/Serilog.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.22823.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{037440DE-440B-4129-9F7A-09B42D00397E}" EndProject @@ -16,17 +16,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5 assets\Serilog.snk = assets\Serilog.snk EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog", "src\Serilog\Serilog.csproj", "{0915DBD9-0F7C-4439-8D9E-74C3D579B219}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Tests", "test\Serilog.Tests\Serilog.Tests.csproj", "{D5648551-D19D-41E3-9FC1-E74B111EEF41}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.FullNetFx", "src\Serilog.FullNetFx\Serilog.FullNetFx.csproj", "{7A9E1095-167D-402A-B43D-B36B97FF183D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.PerformanceTests", "test\Serilog.PerformanceTests\Serilog.PerformanceTests.csproj", "{6A6504BF-CD5B-4C9E-88EB-5BD71CE3106A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.SmokeTest", "test\Serilog.SmokeTest\Serilog.SmokeTest.csproj", "{58563C46-B781-4799-ABD5-9745F94478FD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.MsTests", "test\Serilog.MsTests\Serilog.MsTests.csproj", "{7FC9FC46-5014-4461-A448-815E6CCE21E5}" +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog", "src\Serilog\Serilog.xproj", "{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -34,40 +24,15 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0915DBD9-0F7C-4439-8D9E-74C3D579B219}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0915DBD9-0F7C-4439-8D9E-74C3D579B219}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0915DBD9-0F7C-4439-8D9E-74C3D579B219}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0915DBD9-0F7C-4439-8D9E-74C3D579B219}.Release|Any CPU.Build.0 = Release|Any CPU - {D5648551-D19D-41E3-9FC1-E74B111EEF41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D5648551-D19D-41E3-9FC1-E74B111EEF41}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D5648551-D19D-41E3-9FC1-E74B111EEF41}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D5648551-D19D-41E3-9FC1-E74B111EEF41}.Release|Any CPU.Build.0 = Release|Any CPU - {7A9E1095-167D-402A-B43D-B36B97FF183D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7A9E1095-167D-402A-B43D-B36B97FF183D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7A9E1095-167D-402A-B43D-B36B97FF183D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7A9E1095-167D-402A-B43D-B36B97FF183D}.Release|Any CPU.Build.0 = Release|Any CPU - {6A6504BF-CD5B-4C9E-88EB-5BD71CE3106A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6A6504BF-CD5B-4C9E-88EB-5BD71CE3106A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6A6504BF-CD5B-4C9E-88EB-5BD71CE3106A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6A6504BF-CD5B-4C9E-88EB-5BD71CE3106A}.Release|Any CPU.Build.0 = Release|Any CPU - {58563C46-B781-4799-ABD5-9745F94478FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {58563C46-B781-4799-ABD5-9745F94478FD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {58563C46-B781-4799-ABD5-9745F94478FD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {58563C46-B781-4799-ABD5-9745F94478FD}.Release|Any CPU.Build.0 = Release|Any CPU - {7FC9FC46-5014-4461-A448-815E6CCE21E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7FC9FC46-5014-4461-A448-815E6CCE21E5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7FC9FC46-5014-4461-A448-815E6CCE21E5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7FC9FC46-5014-4461-A448-815E6CCE21E5}.Release|Any CPU.Build.0 = Release|Any CPU + {803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {803CD13A-D54B-4CEC-A55F-E22AE3D93B3C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {0915DBD9-0F7C-4439-8D9E-74C3D579B219} = {037440DE-440B-4129-9F7A-09B42D00397E} - {D5648551-D19D-41E3-9FC1-E74B111EEF41} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - {7A9E1095-167D-402A-B43D-B36B97FF183D} = {037440DE-440B-4129-9F7A-09B42D00397E} - {6A6504BF-CD5B-4C9E-88EB-5BD71CE3106A} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - {58563C46-B781-4799-ABD5-9745F94478FD} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} - {7FC9FC46-5014-4461-A448-815E6CCE21E5} = {0D135C0C-A60B-454A-A2F4-CD74A30E04B0} + {803CD13A-D54B-4CEC-A55F-E22AE3D93B3C} = {037440DE-440B-4129-9F7A-09B42D00397E} EndGlobalSection EndGlobal diff --git a/global.json b/global.json index 96b6dc2b8..58bb789b2 100644 --- a/global.json +++ b/global.json @@ -1,4 +1,6 @@ { - "sources": ["src"] + "projects": [ "src", "test" ], + "sdk": { + "version": "1.0.0-beta5" + } } - diff --git a/src/Serilog.FullNetFx/LoggerConfigurationFullNetFxExtensions-net40.cs b/src/Serilog.FullNetFx/LoggerConfigurationFullNetFxExtensions-net40.cs deleted file mode 100644 index e6774366a..000000000 --- a/src/Serilog.FullNetFx/LoggerConfigurationFullNetFxExtensions-net40.cs +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright 2014 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Threading; -using Serilog.Configuration; -using Serilog.Debugging; -using Serilog.Enrichers; -using Serilog.Events; -using Serilog.Formatting.Display; -using Serilog.Formatting.Raw; -using Serilog.Settings.AppSettings; -using Serilog.Sinks.DiagnosticTrace; -using Serilog.Sinks.IOFile; -using Serilog.Sinks.RollingFile; -using Serilog.Sinks.SystemConsole; - -namespace Serilog -{ - /// - /// Extends to add Full .NET Framework - /// capabilities. - /// - public static class LoggerConfigurationFullNetFxExtensions - { - const string DefaultOutputTemplate = "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] {Message}{NewLine}{Exception}"; - const string DefaultConsoleOutputTemplate = "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level}] {Message}{NewLine}{Exception}"; - const long DefaultFileSizeLimitBytes = 1L * 1024 * 1024 * 1024; - const int DefaultRetainedFileCountLimit = 31; // A long month of logs - - /// - /// Writes log events to . - /// - /// Logger sink configuration. - /// The minimum level for - /// events passed through the sink. - /// A message template describing the format used to write to the sink. - /// the default is "{Timestamp} [{Level}] {Message}{NewLine}{Exception}". - /// Supplies culture-specific formatting information, or null. - /// Configuration object allowing method chaining. - public static LoggerConfiguration Console( - this LoggerSinkConfiguration sinkConfiguration, - LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum, - string outputTemplate = DefaultConsoleOutputTemplate, - IFormatProvider formatProvider = null) - { - if (sinkConfiguration == null) throw new ArgumentNullException("sinkConfiguration"); - if (outputTemplate == null) throw new ArgumentNullException("outputTemplate"); - var formatter = new MessageTemplateTextFormatter(outputTemplate, formatProvider); - return sinkConfiguration.Sink(new ConsoleSink(formatter), restrictedToMinimumLevel); - } - - /// - /// Writes log events to , using color to differentiate - /// between levels. - /// - /// Logger sink configuration. - /// The minimum level for - /// events passed through the sink. - /// A message template describing the format used to write to the sink. - /// the default is "{Timestamp} [{Level}] {Message}{NewLine}{Exception}". - /// Supplies culture-specific formatting information, or null. - /// Configuration object allowing method chaining. - public static LoggerConfiguration ColoredConsole( - this LoggerSinkConfiguration sinkConfiguration, - LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum, - string outputTemplate = DefaultConsoleOutputTemplate, - IFormatProvider formatProvider = null) - { - if (sinkConfiguration == null) throw new ArgumentNullException("sinkConfiguration"); - if (outputTemplate == null) throw new ArgumentNullException("outputTemplate"); - return sinkConfiguration.Sink(new ColoredConsoleSink(outputTemplate, formatProvider), restrictedToMinimumLevel); - } - - /// - /// Write log events in a simple text dump format to the specified file. - /// - /// Logger sink configuration. - /// Path to the dump file. - /// The minimum level for - /// events passed through the sink. - /// Configuration object allowing method chaining. - [Obsolete("Please use WriteTo.Sink(new FileSink(path, new RawFormatter(), null)) instead", true), EditorBrowsable(EditorBrowsableState.Never)] - public static LoggerConfiguration DumpFile( - this LoggerSinkConfiguration sinkConfiguration, - string path, - LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum) - { - if (sinkConfiguration == null) throw new ArgumentNullException("sinkConfiguration"); - if (path == null) throw new ArgumentNullException("path"); - return sinkConfiguration.Sink(new FileSink(path, new RawFormatter(), null), restrictedToMinimumLevel); - } - - /// - /// Write log events to the specified file. - /// - /// Logger sink configuration. - /// Path to the file. - /// The minimum level for - /// events passed through the sink. - /// Supplies culture-specific formatting information, or null. - /// A message template describing the format used to write to the sink. - /// the default is "{Timestamp} [{Level}] {Message}{NewLine}{Exception}". - /// The maximum size, in bytes, to which a log file will be allowed to grow. - /// For unrestricted growth, pass null. The default is 1 GB. - /// Configuration object allowing method chaining. - /// The file will be written using the UTF-8 character set. - public static LoggerConfiguration File( - this LoggerSinkConfiguration sinkConfiguration, - string path, - LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum, - string outputTemplate = DefaultOutputTemplate, - IFormatProvider formatProvider = null, - long? fileSizeLimitBytes = DefaultFileSizeLimitBytes) - { - if (sinkConfiguration == null) throw new ArgumentNullException("sinkConfiguration"); - if (outputTemplate == null) throw new ArgumentNullException("outputTemplate"); - var formatter = new MessageTemplateTextFormatter(outputTemplate, formatProvider); - - FileSink sink; - try - { - sink = new FileSink(path, formatter, fileSizeLimitBytes); - } - catch (ArgumentException) - { - throw; - } - catch (Exception ex) - { - SelfLog.WriteLine("Unable to open file sink for {0}: {1}", path, ex); - return sinkConfiguration.Sink(new NullSink()); - } - - return sinkConfiguration.Sink(sink, restrictedToMinimumLevel); - } - - /// - /// Write log events to a series of files. Each file will be named according to - /// the date of the first log entry written to it. Only simple date-based rolling is - /// currently supported. - /// - /// Logger sink configuration. - /// String describing the location of the log files, - /// with {Date} in the place of the file date. E.g. "Logs\myapp-{Date}.log" will result in log - /// files such as "Logs\myapp-2013-10-20.log", "Logs\myapp-2013-10-21.log" and so on. - /// The minimum level for - /// events passed through the sink. - /// A message template describing the format used to write to the sink. - /// the default is "{Timestamp} [{Level}] {Message}{NewLine}{Exception}". - /// Supplies culture-specific formatting information, or null. - /// The maximum size, in bytes, to which any single log file will be allowed to grow. - /// For unrestricted growth, pass null. The default is 1 GB. - /// The maximum number of log files that will be retained, - /// including the current log file. For unlimited retention, pass null. The default is 31. - /// Configuration object allowing method chaining. - /// The file will be written using the UTF-8 character set. - public static LoggerConfiguration RollingFile( - this LoggerSinkConfiguration sinkConfiguration, - string pathFormat, - LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum, - string outputTemplate = DefaultOutputTemplate, - IFormatProvider formatProvider = null, - long? fileSizeLimitBytes = DefaultFileSizeLimitBytes, - int? retainedFileCountLimit = DefaultRetainedFileCountLimit) - { - if (sinkConfiguration == null) throw new ArgumentNullException("sinkConfiguration"); - if (outputTemplate == null) throw new ArgumentNullException("outputTemplate"); - var formatter = new MessageTemplateTextFormatter(outputTemplate, formatProvider); - var sink = new RollingFileSink(pathFormat, formatter, fileSizeLimitBytes, retainedFileCountLimit); - return sinkConfiguration.Sink(sink, restrictedToMinimumLevel); - } - - /// - /// Write log events to the . - /// - /// Logger sink configuration. - /// The minimum level for - /// events passed through the sink. - /// A message template describing the format used to write to the sink. - /// the default is "{Timestamp} [{Level}] {Message}{NewLine}{Exception}". - /// Supplies culture-specific formatting information, or null. - /// Configuration object allowing method chaining. - public static LoggerConfiguration Trace( - this LoggerSinkConfiguration sinkConfiguration, - LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum, - string outputTemplate = DefaultOutputTemplate, - IFormatProvider formatProvider = null) - { - if (sinkConfiguration == null) throw new ArgumentNullException("sinkConfiguration"); - if (outputTemplate == null) throw new ArgumentNullException("outputTemplate"); - var formatter = new MessageTemplateTextFormatter(outputTemplate, formatProvider); - return sinkConfiguration.Sink(new DiagnosticTraceSink(formatter), restrictedToMinimumLevel); - } - - /// - /// Enrich log events with properties from . - /// - /// Logger enrichment configuration. - /// Configuration object allowing method chaining. - /// -#if !ASPNETCORE50 - public static LoggerConfiguration FromLogContext( - this LoggerEnrichmentConfiguration enrichmentConfiguration) - { - if (enrichmentConfiguration == null) throw new ArgumentNullException("enrichmentConfiguration"); - return enrichmentConfiguration.With(); - } -#endif - - /// - /// Enrich log events with a ThreadId property containing the current . - /// - /// Logger enrichment configuration. - /// Configuration object allowing method chaining. - /// - public static LoggerConfiguration WithThreadId( - this LoggerEnrichmentConfiguration enrichmentConfiguration) - { - if (enrichmentConfiguration == null) throw new ArgumentNullException("enrichmentConfiguration"); - return enrichmentConfiguration.With(); - } - - /// - /// Enrich log events with a ProcessId property containing the current . - /// - /// Logger enrichment configuration. - /// Configuration object allowing method chaining. - public static LoggerConfiguration WithProcessId( - this LoggerEnrichmentConfiguration enrichmentConfiguration) - { - if (enrichmentConfiguration == null) throw new ArgumentNullException("enrichmentConfiguration"); - return enrichmentConfiguration.With(); - } - - /// - /// Enrich log events with a MachineName property containing the current . - /// - /// Logger enrichment configuration. - /// Configuration object allowing method chaining. - public static LoggerConfiguration WithMachineName( - this LoggerEnrichmentConfiguration enrichmentConfiguration) - { - if (enrichmentConfiguration == null) throw new ArgumentNullException("enrichmentConfiguration"); - return enrichmentConfiguration.With(); - } - - - /// - /// Reads the <appSettings> element of App.config or Web.config, searching for for keys - /// that look like: serilog:*, which are used to configure - /// the logger. To add a sink, use a key like serilog:write-to:File.path for - /// each parameter to the sink's configuration method. To add an additional assembly - /// containing sinks, use serilog:using. To set the level use - /// serilog:minimum-level. - /// - /// Logger setting configuration - /// An object allowing configuration to continue. - public static LoggerConfiguration AppSettings( - this LoggerSettingsConfiguration settingConfiguration) - { - if (settingConfiguration == null) throw new ArgumentNullException("settingConfiguration"); - return settingConfiguration.Settings(new AppSettingsSettings()); - } - } -} diff --git a/src/Serilog.FullNetFx/Project.json b/src/Serilog.FullNetFx/Project.json deleted file mode 100644 index 7bcc1afe9..000000000 --- a/src/Serilog.FullNetFx/Project.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "version": "1.0.0-beta-*", - "dependencies": { - "Serilog": "" - }, - "code": "**/*.cs", - "exclude": "**/*-net40.cs", - - "frameworks": { - "aspnetcore50": { - "dependencies": { - "Microsoft.CSharp": "4.0.0-beta-22231", - "System.Collections": "4.0.10-beta-22231", - "System.Collections.Concurrent": "4.0.0-beta-22231", - "System.Collections.NonGeneric": "4.0.0-beta-22231", - "System.Collections.Specialized": "4.0.0-beta-22231", - "System.Console": "4.0.0-beta-22231", - "System.Diagnostics.Debug": "4.0.10-beta-22231", - "System.Diagnostics.Process": "4.0.0-beta-22231", - "System.Diagnostics.TraceSource": "4.0.0-beta-22231", - "System.Diagnostics.Tools": "4.0.0-beta-22231", - "System.Dynamic.Runtime": "4.0.0-beta-22231", - "System.Globalization": "4.0.10-beta-22231", - "System.Globalization.Calendars": "4.0.0-beta-22231", - "System.IO": "4.0.10-beta-22231", - "System.IO.FileSystem": "4.0.0-beta-22231", - "System.IO.FileSystem.Primitives": "4.0.0-beta-22231", - "System.Linq": "4.0.0-beta-22231", - "System.Net.Sockets": "4.0.0-beta-22231", - "System.ObjectModel": "4.0.0-beta-22231", - "System.Reflection": "4.0.10-beta-22231", - "System.Runtime": "4.0.20-beta-22231", - "System.Runtime.Extensions": "4.0.10-beta-22231", - "System.Runtime.InteropServices": "4.0.20-beta-22231", - "System.Text.RegularExpressions": "4.0.0-beta-22231", - "System.Threading.Timer": "4.0.0-beta-22231", - "System.Threading.Thread": "4.0.0-beta-22231" - } - } - } -} \ No newline at end of file diff --git a/src/Serilog.FullNetFx/Properties/AssemblyInfo.cs b/src/Serilog.FullNetFx/Properties/AssemblyInfo.cs deleted file mode 100644 index daca6b6d9..000000000 --- a/src/Serilog.FullNetFx/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle("Serilog.FullNetFx")] -[assembly: AssemblyDescription("Serilog Logging Library Full .NET Framework Support")] -[assembly: AssemblyCopyright("Copyright © Serilog Contributors 2013")] - -#if !ASPNETCORE50 -[assembly: InternalsVisibleTo("Serilog.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100fb8d13fd344a1c" + - "6fe0fe83ef33c1080bf30690765bc6eb0df26ebfdf8f21670c64265b30db09f73a0dea5b3db4c9" + - "d18dbf6d5a25af5ce9016f281014d79dc3b4201ac646c451830fc7e61a2dfd633d34c39f87b818" + - "94191652df5ac63cc40c77f3542f702bda692e6e8a9158353df189007a49da0f3cfd55eb250066" + - "b19485ec")] -#else -[assembly: InternalsVisibleTo("Serilog.Tests")] -#endif \ No newline at end of file diff --git a/src/Serilog.FullNetFx/Serilog.FullNetFx-aspnetcore50.kproj b/src/Serilog.FullNetFx/Serilog.FullNetFx-aspnetcore50.kproj deleted file mode 100644 index cdbf8d9a3..000000000 --- a/src/Serilog.FullNetFx/Serilog.FullNetFx-aspnetcore50.kproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 370c3957-e1f5-4818-b391-8dca083d7a9f - Library - - - - - - - 2.0 - - - True - - - \ No newline at end of file diff --git a/src/Serilog.FullNetFx/Serilog.FullNetFx-net40.csproj b/src/Serilog.FullNetFx/Serilog.FullNetFx-net40.csproj deleted file mode 100644 index f70eb219e..000000000 --- a/src/Serilog.FullNetFx/Serilog.FullNetFx-net40.csproj +++ /dev/null @@ -1,93 +0,0 @@ - - - - - Debug - AnyCPU - {7A9E1095-167D-402A-B43D-B36B97FF183D} - Library - Properties - Serilog - Serilog.FullNetFx - v4.0 - 512 - Client - - - true - full - false - bin40\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin40\Debug\Serilog.FullNetFx.XML - - - pdbonly - true - bin40\Release\ - TRACE - prompt - 4 - true - bin40\Release\Serilog.FullNetFx.XML - - - true - - - ..\..\assets\Serilog.snk - - - - - - - - - - - - - - - - - - Properties\CommonAssemblyInfo.cs - - - - - - - - - - - - - - - - - - Serilog.snk - - - - - - - - - - - {0915dbd9-0f7c-4439-8d9e-74c3d579b219} - Serilog-net40 - - - - \ No newline at end of file diff --git a/src/Serilog.FullNetFx/Serilog.FullNetFx.csproj b/src/Serilog.FullNetFx/Serilog.FullNetFx.csproj deleted file mode 100644 index 36ee2a2d0..000000000 --- a/src/Serilog.FullNetFx/Serilog.FullNetFx.csproj +++ /dev/null @@ -1,87 +0,0 @@ - - - - - Debug - AnyCPU - {7A9E1095-167D-402A-B43D-B36B97FF183D} - Library - Properties - Serilog - Serilog.FullNetFx - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\Serilog.FullNetFx.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\Serilog.FullNetFx.XML - - - true - - - ..\..\assets\Serilog.snk - - - - - - - - - - - - - - - - - - Properties\CommonAssemblyInfo.cs - - - - - - - - - - - - - - - - - - Serilog.snk - - - - - {0915dbd9-0f7c-4439-8d9e-74c3d579b219} - Serilog - - - - - \ No newline at end of file diff --git a/src/Serilog.FullNetFx/Sinks/PeriodicBatching/PeriodicBatchingSink-net40.cs b/src/Serilog.FullNetFx/Sinks/PeriodicBatching/PeriodicBatchingSink-net40.cs deleted file mode 100644 index 57f85a4c5..000000000 --- a/src/Serilog.FullNetFx/Sinks/PeriodicBatching/PeriodicBatchingSink-net40.cs +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright 2014 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Threading; -using Serilog.Core; -using Serilog.Debugging; -using Serilog.Events; - -namespace Serilog.Sinks.PeriodicBatching -{ - /// - /// Base class for sinks that log events in batches. Batching is - /// triggered asynchronously on a timer. - /// - /// - /// To avoid unbounded memory growth, events are discarded after attempting - /// to send a batch, regardless of whether the batch succeeded or not. Implementers - /// that want to change this behavior need to either implement from scratch, or - /// embed retry logic in the batch emitting functions. - /// - public abstract class PeriodicBatchingSink : ILogEventSink, IDisposable - { - readonly int _batchSizeLimit; - readonly ConcurrentQueue _queue; - readonly BatchedConnectionStatus _status; - readonly Queue _waitingBatch = new Queue(); - - readonly object _stateLock = new object(); - readonly Timer _timer; - bool _unloading; - bool _started; - - /// - /// Construct a sink posting to the specified database. - /// - /// The maximum number of events to include in a single batch. - /// The time to wait between checking for event batches. - protected PeriodicBatchingSink(int batchSizeLimit, TimeSpan period) - { - _batchSizeLimit = batchSizeLimit; - _queue = new ConcurrentQueue(); - _timer = new Timer(s => OnTick()); - _status = new BatchedConnectionStatus(period); - - AppDomain.CurrentDomain.DomainUnload += OnAppDomainUnloading; - AppDomain.CurrentDomain.ProcessExit += OnAppDomainUnloading; - AppDomain.CurrentDomain.UnhandledException += OnAppDomainUnloading; - } - - void OnAppDomainUnloading(object sender, EventArgs args) - { - var eventArgs = args as UnhandledExceptionEventArgs; - if (eventArgs != null && !eventArgs.IsTerminating) - return; - - CloseAndFlush(); - } - - void CloseAndFlush() - { - lock (_stateLock) - { - if (!_started || _unloading) - return; - - _unloading = true; - } - - AppDomain.CurrentDomain.DomainUnload -= OnAppDomainUnloading; - AppDomain.CurrentDomain.ProcessExit -= OnAppDomainUnloading; - AppDomain.CurrentDomain.UnhandledException -= OnAppDomainUnloading; - - var wh = new ManualResetEvent(false); - if (_timer.Dispose(wh)) - wh.WaitOne(); - - OnTick(); - } - - /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// - /// 2 - public void Dispose() - { - Dispose(true); - } - - /// - /// Free resources held by the sink. - /// - /// If true, called because the object is being disposed; if false, - /// the object is being disposed from the finalizer. - protected virtual void Dispose(bool disposing) - { - if (!disposing) return; - CloseAndFlush(); - } - - /// - /// Emit a batch of log events, running to completion synchronously. - /// - /// The events to emit. - protected abstract void EmitBatch(IEnumerable events); - - void OnTick() - { - try - { - do - { - LogEvent next; - while (_waitingBatch.Count < _batchSizeLimit && - _queue.TryDequeue(out next)) - { - if (CanInclude(next)) - _waitingBatch.Enqueue(next); - } - - if (_waitingBatch.Count == 0) - return; - - EmitBatch(_waitingBatch); - _waitingBatch.Clear(); - _status.MarkSuccess(); - } - while (true); - } - catch (Exception ex) - { - SelfLog.WriteLine("Exception while emitting periodic batch from {0}: {1}", this, ex); - _status.MarkFailure(); - } - finally - { - if (_status.ShouldDropBatch) - _waitingBatch.Clear(); - - if (_status.ShouldDropQueue) - { - LogEvent evt; - while (_queue.TryDequeue(out evt)) { } - } - - lock (_stateLock) - { - if (!_unloading) - _timer.Change(_status.NextInterval, TimeSpan.FromMilliseconds(-1)); - } - } - } - - /// - /// Emit the provided log event to the sink. If the sink is being disposed or - /// the app domain unloaded, then the event is ignored. - /// - /// Log event to emit. - /// The event is null. - /// - /// The sink implements the contract that any events whose Emit() method has - /// completed at the time of sink disposal will be flushed (or attempted to, - /// depending on app domain state). - /// - public void Emit(LogEvent logEvent) - { - if (logEvent == null) throw new ArgumentNullException("logEvent"); - - lock (_stateLock) - { - if (_unloading) return; - if (!_started) - { - // Special handling to try to get the first event across as quickly - // as possible to show we're alive! - _started = true; - _timer.Change(TimeSpan.Zero, TimeSpan.FromMilliseconds(-1)); - } - } - - _queue.Enqueue(logEvent); - } - - /// - /// Determine whether a queued log event should be included in the batch. If - /// an override returns false, the event will be dropped. - /// - /// - /// - protected virtual bool CanInclude(LogEvent evt) - { - return true; - } - } -} diff --git a/src/Serilog.FullNetFx/Sinks/SystemConsole/ColoredConsoleSink-net40.cs b/src/Serilog.FullNetFx/Sinks/SystemConsole/ColoredConsoleSink-net40.cs deleted file mode 100644 index 28e679143..000000000 --- a/src/Serilog.FullNetFx/Sinks/SystemConsole/ColoredConsoleSink-net40.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2013 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.IO; -using Serilog.Core; -using Serilog.Events; -using System.Collections.Generic; -using Serilog.Formatting.Display; -using Serilog.Parsing; - -namespace Serilog.Sinks.SystemConsole -{ - class ColoredConsoleSink : ILogEventSink - { - readonly IFormatProvider _formatProvider; - - class Palette - { - public ConsoleColor Base { get; set; } - public ConsoleColor BaseText { get; set; } - public ConsoleColor Highlight { get; set; } - public ConsoleColor HighlightText { get; set; } - } - - static readonly Palette DefaultPalette = new Palette { Base = ConsoleColor.Black, BaseText = ConsoleColor.Gray, - Highlight = ConsoleColor.DarkGray, HighlightText = ConsoleColor.Gray }; - - static readonly IDictionary LevelPalettes = new Dictionary - { - { LogEventLevel.Verbose, new Palette { Base = ConsoleColor.Black, BaseText = ConsoleColor.DarkGray, - Highlight = ConsoleColor.Black, HighlightText = ConsoleColor.Gray } }, - { LogEventLevel.Debug, new Palette { Base = ConsoleColor.Black, BaseText = ConsoleColor.Gray, - Highlight = ConsoleColor.Black, HighlightText = ConsoleColor.White } }, - { LogEventLevel.Information, new Palette { Base = ConsoleColor.Black, BaseText = ConsoleColor.White, - Highlight = ConsoleColor.DarkBlue, HighlightText = ConsoleColor.White } }, - { LogEventLevel.Warning, new Palette { Base = ConsoleColor.Black, BaseText = ConsoleColor.Yellow, - Highlight = ConsoleColor.DarkYellow, HighlightText = ConsoleColor.White } }, - { LogEventLevel.Error, new Palette { Base = ConsoleColor.Black, BaseText = ConsoleColor.Red, - Highlight = ConsoleColor.Red, HighlightText = ConsoleColor.White } }, - { LogEventLevel.Fatal, new Palette { Base = ConsoleColor.DarkRed, BaseText = ConsoleColor.White, - Highlight = ConsoleColor.Red, HighlightText = ConsoleColor.White } } - }; - - readonly object _syncRoot = new object(); - readonly MessageTemplate _outputTemplate; - - public ColoredConsoleSink(string outputTemplate, IFormatProvider formatProvider) - { - if (outputTemplate == null) throw new ArgumentNullException("outputTemplate"); - _outputTemplate = new MessageTemplateParser().Parse(outputTemplate); - _formatProvider = formatProvider; - } - - const string StackFrameLinePrefix = " "; - - public void Emit(LogEvent logEvent) - { - if (logEvent == null) throw new ArgumentNullException("logEvent"); - - var outputProperties = OutputProperties.GetOutputProperties(logEvent); - var palette = GetPalette(logEvent.Level); - var output = Console.Out; - - lock (_syncRoot) - { - try - { - foreach (var outputToken in _outputTemplate.Tokens) - { - var propertyToken = outputToken as PropertyToken; - if (propertyToken == null) - { - RenderOutputToken(palette, outputToken, outputProperties, output); - } - else switch (propertyToken.PropertyName) - { - case OutputProperties.MessagePropertyName: - RenderMessageToken(logEvent, palette, output); - break; - case OutputProperties.ExceptionPropertyName: - RenderExceptionToken(palette, propertyToken, outputProperties, output); - break; - default: - RenderOutputToken(palette, outputToken, outputProperties, output); - break; - } - } - } - finally { Console.ResetColor(); } - } - } - - void RenderExceptionToken(Palette palette, MessageTemplateToken outputToken, IDictionary outputProperties, TextWriter output) - { - var sw = new StringWriter(); - outputToken.Render(outputProperties, sw, _formatProvider); - var lines = new StringReader(sw.ToString()); - string nextLine; - while ((nextLine = lines.ReadLine()) != null) - { - if (nextLine.StartsWith(StackFrameLinePrefix)) - SetBaseColors(palette); - else - SetHighlightColors(palette); - output.WriteLine(nextLine); - } - } - - void RenderMessageToken(LogEvent logEvent, Palette palette, TextWriter output) - { - foreach (var messageToken in logEvent.MessageTemplate.Tokens) - { - var messagePropertyToken = messageToken as PropertyToken; - if (messagePropertyToken != null) - { - SetHighlightColors(palette); - messageToken.Render(logEvent.Properties, output, _formatProvider); - } - else - { - SetBaseColors(palette); - messageToken.Render(logEvent.Properties, output, _formatProvider); - } - } - } - - void RenderOutputToken(Palette palette, MessageTemplateToken outputToken, IDictionary outputProperties, TextWriter output) - { - SetBaseColors(palette); - outputToken.Render(outputProperties, output, _formatProvider); - } - - static Palette GetPalette(LogEventLevel level) - { - Palette palette; - if (!LevelPalettes.TryGetValue(level, out palette)) - palette = DefaultPalette; - - return palette; - } - - static void SetBaseColors(Palette palette) - { - SetColors(palette.Base, palette.BaseText); - } - - static void SetHighlightColors(Palette palette) - { - SetColors(palette.Highlight, palette.HighlightText); - } - - static void SetColors(ConsoleColor background, ConsoleColor foreground) - { - Console.BackgroundColor = background; - Console.ForegroundColor = foreground; - } - } -} diff --git a/src/Serilog/Configuration/LoggerSettingsConfiguration-net40.cs b/src/Serilog/Configuration/LoggerSettingsConfiguration-net40.cs deleted file mode 100644 index b39ba89ea..000000000 --- a/src/Serilog/Configuration/LoggerSettingsConfiguration-net40.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2015 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; - -namespace Serilog.Configuration -{ - /// - /// Allows additional setting sources to drive the logger configuration. - /// - public class LoggerSettingsConfiguration - { - readonly LoggerConfiguration _loggerConfiguration; - - internal LoggerSettingsConfiguration(LoggerConfiguration loggerConfiguration) - { - if (loggerConfiguration == null) throw new ArgumentNullException("loggerConfiguration"); - _loggerConfiguration = loggerConfiguration; - } - - /// - /// Apply external settings to the logger configuration. - /// - /// Configuration object allowing method chaining. - public LoggerConfiguration Settings(ILoggerSettings settings) - { - if (settings == null) throw new ArgumentNullException("settings"); - - settings.Configure(_loggerConfiguration); - - return _loggerConfiguration; - } - } -} diff --git a/src/Serilog.FullNetFx/Context/ImmutableStack.cs b/src/Serilog/Context/ImmutableStack.cs similarity index 98% rename from src/Serilog.FullNetFx/Context/ImmutableStack.cs rename to src/Serilog/Context/ImmutableStack.cs index 237cf2ef2..c18064522 100644 --- a/src/Serilog.FullNetFx/Context/ImmutableStack.cs +++ b/src/Serilog/Context/ImmutableStack.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !ASPNETCORE50 +#if !PROFILE259 && !DNXCORE50 using System; using System.Collections.Generic; using System.Runtime.Serialization; diff --git a/src/Serilog.FullNetFx/Context/LogContext.cs b/src/Serilog/Context/LogContext.cs similarity index 99% rename from src/Serilog.FullNetFx/Context/LogContext.cs rename to src/Serilog/Context/LogContext.cs index 21ed80f03..3e2daf464 100644 --- a/src/Serilog.FullNetFx/Context/LogContext.cs +++ b/src/Serilog/Context/LogContext.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !ASPNETCORE50 +#if !PROFILE259 && !DNXCORE50 using System; using System.Runtime.Remoting.Messaging; using Serilog.Core; diff --git a/src/Serilog.FullNetFx/Enrichers/LogContextEnricher.cs b/src/Serilog/Enrichers/LogContextEnricher.cs similarity index 96% rename from src/Serilog.FullNetFx/Enrichers/LogContextEnricher.cs rename to src/Serilog/Enrichers/LogContextEnricher.cs index f464ace27..a9e89ea1c 100644 --- a/src/Serilog.FullNetFx/Enrichers/LogContextEnricher.cs +++ b/src/Serilog/Enrichers/LogContextEnricher.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !ASPNETCORE50 +#if !PROFILE259 && !DNXCORE50 using Serilog.Context; using Serilog.Core; using Serilog.Events; diff --git a/src/Serilog.FullNetFx/Enrichers/MachineNameEnricher.cs b/src/Serilog/Enrichers/MachineNameEnricher.cs similarity index 97% rename from src/Serilog.FullNetFx/Enrichers/MachineNameEnricher.cs rename to src/Serilog/Enrichers/MachineNameEnricher.cs index f6be9a7af..044bdb824 100644 --- a/src/Serilog.FullNetFx/Enrichers/MachineNameEnricher.cs +++ b/src/Serilog/Enrichers/MachineNameEnricher.cs @@ -16,6 +16,7 @@ using Serilog.Core; using Serilog.Events; +#if !PROFILE259 namespace Serilog.Enrichers { /// @@ -37,7 +38,7 @@ public class MachineNameEnricher : ILogEventEnricher /// Factory for creating new properties to add to the event. public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory) { -#if !ASPNETCORE50 +#if !DNXCORE50 _cachedProperty = _cachedProperty ?? propertyFactory.CreateProperty(MachineNamePropertyName, Environment.MachineName); #else _cachedProperty = _cachedProperty ?? propertyFactory.CreateProperty(MachineNamePropertyName, Environment.GetEnvironmentVariable("COMPUTERNAME")); @@ -46,3 +47,4 @@ public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory) } } } +#endif diff --git a/src/Serilog.FullNetFx/Enrichers/ProcessIdEnricher.cs b/src/Serilog/Enrichers/ProcessIdEnricher.cs similarity index 89% rename from src/Serilog.FullNetFx/Enrichers/ProcessIdEnricher.cs rename to src/Serilog/Enrichers/ProcessIdEnricher.cs index 3a58d7947..9b13a742a 100644 --- a/src/Serilog.FullNetFx/Enrichers/ProcessIdEnricher.cs +++ b/src/Serilog/Enrichers/ProcessIdEnricher.cs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -using System.Diagnostics; using Serilog.Core; using Serilog.Events; +#if !PROFILE259 namespace Serilog.Enrichers { /// - /// Enriches log events with a ProcessId property containing the current . + /// Enriches log events with a ProcessId property containing the current . /// public class ProcessIdEnricher : ILogEventEnricher { @@ -37,8 +37,9 @@ public class ProcessIdEnricher : ILogEventEnricher /// Factory for creating new properties to add to the event. public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory) { - _cachedProperty = _cachedProperty ?? propertyFactory.CreateProperty(ProcessIdPropertyName, Process.GetCurrentProcess().Id); + _cachedProperty = _cachedProperty ?? propertyFactory.CreateProperty(ProcessIdPropertyName, System.Diagnostics.Process.GetCurrentProcess().Id); logEvent.AddPropertyIfAbsent(_cachedProperty); } } } +#endif diff --git a/src/Serilog.FullNetFx/Enrichers/ThreadIdEnricher.cs b/src/Serilog/Enrichers/ThreadIdEnricher.cs similarity index 98% rename from src/Serilog.FullNetFx/Enrichers/ThreadIdEnricher.cs rename to src/Serilog/Enrichers/ThreadIdEnricher.cs index f2cb9cf3f..99699d60d 100644 --- a/src/Serilog.FullNetFx/Enrichers/ThreadIdEnricher.cs +++ b/src/Serilog/Enrichers/ThreadIdEnricher.cs @@ -16,6 +16,7 @@ using Serilog.Core; using Serilog.Events; +#if !PROFILE259 namespace Serilog.Enrichers { /// @@ -39,3 +40,4 @@ public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory) } } } +#endif diff --git a/src/Serilog/Events/DictionaryValue-net40.cs b/src/Serilog/Events/DictionaryValue-net40.cs deleted file mode 100644 index 39d718a03..000000000 --- a/src/Serilog/Events/DictionaryValue-net40.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2013 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; - -namespace Serilog.Events -{ - /// - /// A value represented as a mapping from keys to values. - /// - public class DictionaryValue : LogEventPropertyValue - { - readonly IDictionary _elements; - - /// - /// Create a with the provided . - /// - /// The key-value mappings represented in the dictionary. - /// - public DictionaryValue(IEnumerable> elements) - { - if (elements == null) throw new ArgumentNullException("elements"); - _elements = elements.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - } - - /// - /// The dictionary mapping. - /// - public IDictionary Elements { get { return _elements; } } - - /// - /// Render the value to the output. - /// - /// The output. - /// A format string applied to the value, or null. - /// A format provider to apply to the value, or null to use the default. - /// . - public override void Render(TextWriter output, string format = null, IFormatProvider formatProvider = null) - { - if (output == null) throw new ArgumentNullException("output"); - - output.Write('['); - var delim = "("; - foreach (var kvp in _elements) - { - output.Write(delim); - delim = ", ("; - kvp.Key.Render(output, null, formatProvider); - output.Write(": "); - kvp.Value.Render(output, null, formatProvider); - output.Write(")"); - } - - output.Write(']'); - } - } -} diff --git a/src/Serilog/Events/DictionaryValue.cs b/src/Serilog/Events/DictionaryValue.cs index e1403bef0..b12da0b0c 100644 --- a/src/Serilog/Events/DictionaryValue.cs +++ b/src/Serilog/Events/DictionaryValue.cs @@ -17,6 +17,12 @@ using System.IO; using System.Linq; +#if NET40 +using IScalarDictionary = System.Collections.Generic.IDictionary; +#else +using IScalarDictionary = System.Collections.Generic.IReadOnlyDictionary; +#endif + namespace Serilog.Events { /// @@ -24,7 +30,7 @@ namespace Serilog.Events /// public class DictionaryValue : LogEventPropertyValue { - readonly IReadOnlyDictionary _elements; + readonly IScalarDictionary _elements; /// /// Create a with the provided . @@ -40,7 +46,7 @@ public DictionaryValue(IEnumerable /// The dictionary mapping. /// - public IReadOnlyDictionary Elements { get { return _elements; } } + public IScalarDictionary Elements { get { return _elements; } } /// /// Render the value to the output. diff --git a/src/Serilog/Events/LogEvent-net40.cs b/src/Serilog/Events/LogEvent-net40.cs deleted file mode 100644 index 4bb155ba1..000000000 --- a/src/Serilog/Events/LogEvent-net40.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright 2013 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.IO; - -namespace Serilog.Events -{ - /// - /// A log event. - /// - public class LogEvent - { - readonly DateTimeOffset _timestamp; - readonly LogEventLevel _level; - readonly Exception _exception; - readonly MessageTemplate _messageTemplate; - readonly Dictionary _properties; - - /// - /// Construct a new . - /// - /// The time at which the event occurred. - /// The level of the event. - /// An exception associated with the event, or null. - /// The message template describing the event. - /// Properties associated with the event, including those presented in . - public LogEvent(DateTimeOffset timestamp, LogEventLevel level, Exception exception, MessageTemplate messageTemplate, IEnumerable properties) - { - if (messageTemplate == null) throw new ArgumentNullException("messageTemplate"); - if (properties == null) throw new ArgumentNullException("properties"); - _timestamp = timestamp; - _level = level; - _exception = exception; - _messageTemplate = messageTemplate; - _properties = new Dictionary(); - foreach (var p in properties) - AddOrUpdateProperty(p); - } - - /// - /// The time at which the event occurred. - /// - public DateTimeOffset Timestamp - { - get { return _timestamp; } - } - - /// - /// The level of the event. - /// - public LogEventLevel Level - { - get { return _level; } - } - - /// - /// The message template describing the event. - /// - public MessageTemplate MessageTemplate - { - get { return _messageTemplate; } - } - - /// - /// Render the message template to the specified output, given the properties associated - /// with the event. - /// - /// The output. - /// Supplies culture-specific formatting information, or null. - public void RenderMessage(TextWriter output, IFormatProvider formatProvider = null) - { - MessageTemplate.Render(Properties, output, formatProvider); - } - - /// - /// Render the message template given the properties associated - /// with the event, and return the result. - /// - /// Supplies culture-specific formatting information, or null. - public string RenderMessage(IFormatProvider formatProvider = null) - { - return MessageTemplate.Render(Properties, formatProvider); - } - - /// - /// Properties associated with the event, including those presented in . - /// - public IDictionary Properties - { - get { return _properties; } - } - - /// - /// An exception associated with the event, or null. - /// - public Exception Exception - { - get { return _exception; } - } - - /// - /// Add a property to the event if not already present, otherwise, update its value. - /// - /// The property to add or update. - /// - public void AddOrUpdateProperty(LogEventProperty property) - { - if (property == null) throw new ArgumentNullException("property"); - _properties[property.Name] = property.Value; - } - - /// - /// Add a property to the event if not already present. - /// - /// The property to add. - /// - public void AddPropertyIfAbsent(LogEventProperty property) - { - if (property == null) throw new ArgumentNullException("property"); - if (!_properties.ContainsKey(property.Name)) - _properties.Add(property.Name, property.Value); - } - - /// - /// Remove a property from the event, if present. Otherwise no action - /// is performed. - /// - /// The name of the property to remove. - public void RemovePropertyIfPresent(string propertyName) - { - _properties.Remove(propertyName); - } - } -} \ No newline at end of file diff --git a/src/Serilog/Events/LogEvent.cs b/src/Serilog/Events/LogEvent.cs index d2e87d21e..bd117f0cb 100644 --- a/src/Serilog/Events/LogEvent.cs +++ b/src/Serilog/Events/LogEvent.cs @@ -16,6 +16,12 @@ using System.Collections.Generic; using System.IO; +#if NET40 +using IPropertyDictionary = System.Collections.Generic.IDictionary; +#else +using IPropertyDictionary = System.Collections.Generic.IReadOnlyDictionary; +#endif + namespace Serilog.Events { /// @@ -98,7 +104,7 @@ public string RenderMessage(IFormatProvider formatProvider = null) /// /// Properties associated with the event, including those presented in . /// - public IReadOnlyDictionary Properties + public IPropertyDictionary Properties { get { return _properties; } } diff --git a/src/Serilog/Events/MessageTemplate-net40.cs b/src/Serilog/Events/MessageTemplate-net40.cs deleted file mode 100644 index bd44f190b..000000000 --- a/src/Serilog/Events/MessageTemplate-net40.cs +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2013 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using Serilog.Debugging; -using Serilog.Parsing; - -namespace Serilog.Events -{ - /// - /// Represents a message template passed to a log method. The template - /// can subsequently render the template in textual form given the list - /// of properties. - /// - public class MessageTemplate - { - readonly string _text; - readonly MessageTemplateToken[] _tokens; - - // Optimisation for when the template is bound to - // property values. - readonly PropertyToken[] _positionalProperties; - readonly PropertyToken[] _namedProperties; - - /// - /// Construct a message template using manually-defined text and property tokens. - /// - /// The text and property tokens defining the template. - public MessageTemplate(IEnumerable tokens) - : this(string.Join("", tokens), tokens) - { - } - - /// - /// Construct a message template using manually-defined text and property tokens. - /// - /// The full text of the template; used by Serilog internally to avoid unneeded - /// string concatenation. - /// The text and property tokens defining the template. - public MessageTemplate(string text, IEnumerable tokens) - { - if (text == null) throw new ArgumentNullException("text"); - if (tokens == null) throw new ArgumentNullException("tokens"); - - _text = text; - _tokens = tokens.ToArray(); - - var propertyTokens = _tokens.OfType().ToArray(); - if (propertyTokens.Length != 0) - { - var allPositional = true; - var anyPositional = false; - foreach (var propertyToken in propertyTokens) - { - if (propertyToken.IsPositional) - anyPositional = true; - else - allPositional = false; - } - - if (allPositional) - { - _positionalProperties = propertyTokens; - } - else - { - if (anyPositional) - SelfLog.WriteLine("Message template is malformed: {0}", text); - - _namedProperties = propertyTokens; - } - } - } - - /// - /// The raw text describing the template. - /// - public string Text - { - get { return _text; } - } - - /// - /// Render the template as a string. - /// - /// The string representation of the template. - public override string ToString() - { - return Text; - } - - /// - /// The tokens parsed from the template. - /// - public IEnumerable Tokens - { - get { return _tokens; } - } - - internal PropertyToken[] NamedProperties - { - get { return _namedProperties; } - } - - internal PropertyToken[] PositionalProperties - { - get { return _positionalProperties; } - } - - /// - /// Convert the message template into a textual message, given the - /// properties matching the tokens in the message template. - /// - /// Properties matching template tokens. - /// Supplies culture-specific formatting information, or null. - /// The message created from the template and properties. If the - /// properties are mismatched with the template, the template will be - /// returned with incomplete substitution. - public string Render(IDictionary properties, IFormatProvider formatProvider = null) - { - var writer = new StringWriter(formatProvider); - Render(properties, writer, formatProvider); - return writer.ToString(); - } - - /// - /// Convert the message template into a textual message, given the - /// properties matching the tokens in the message template. - /// - /// Properties matching template tokens. - /// The message created from the template and properties. If the - /// properties are mismatched with the template, the template will be - /// returned with incomplete substitution. - /// Supplies culture-specific formatting information, or null. - public void Render(IDictionary properties, TextWriter output, IFormatProvider formatProvider = null) - { - foreach (var token in _tokens) - { - token.Render(properties, output, formatProvider); - } - } - } -} \ No newline at end of file diff --git a/src/Serilog/Events/MessageTemplate.cs b/src/Serilog/Events/MessageTemplate.cs index f09f3aa23..31c9f93bf 100644 --- a/src/Serilog/Events/MessageTemplate.cs +++ b/src/Serilog/Events/MessageTemplate.cs @@ -19,6 +19,12 @@ using Serilog.Debugging; using Serilog.Parsing; +#if NET40 +using IPropertyDictionary = System.Collections.Generic.IDictionary; +#else +using IPropertyDictionary = System.Collections.Generic.IReadOnlyDictionary; +#endif + namespace Serilog.Events { /// @@ -130,7 +136,7 @@ internal PropertyToken[] PositionalProperties /// The message created from the template and properties. If the /// properties are mismatched with the template, the template will be /// returned with incomplete substitution. - public string Render(IReadOnlyDictionary properties, IFormatProvider formatProvider = null) + public string Render(IPropertyDictionary properties, IFormatProvider formatProvider = null) { var writer = new StringWriter(formatProvider); Render(properties, writer, formatProvider); @@ -146,7 +152,7 @@ public string Render(IReadOnlyDictionary properti /// properties are mismatched with the template, the template will be /// returned with incomplete substitution. /// Supplies culture-specific formatting information, or null. - public void Render(IReadOnlyDictionary properties, TextWriter output, IFormatProvider formatProvider = null) + public void Render(IPropertyDictionary properties, TextWriter output, IFormatProvider formatProvider = null) { foreach (var token in _tokens) { diff --git a/src/Serilog/Events/SequenceValue-net40.cs b/src/Serilog/Events/SequenceValue-net40.cs deleted file mode 100644 index 5d509f18b..000000000 --- a/src/Serilog/Events/SequenceValue-net40.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2013 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; - -namespace Serilog.Events -{ - /// - /// A value represented as an ordered sequence of values. - /// - public class SequenceValue : LogEventPropertyValue - { - readonly LogEventPropertyValue[] _elements; - - /// - /// Create a with the provided . - /// - /// The elements of the sequence. - /// - public SequenceValue(IEnumerable elements) - { - if (elements == null) throw new ArgumentNullException("elements"); - _elements = elements.ToArray(); - } - - /// - /// The elements of the sequence. - /// - public IList Elements { get { return _elements; } } - - /// - /// Render the value to the output. - /// - /// The output. - /// A format string applied to the value, or null. - /// A format provider to apply to the value, or null to use the default. - /// . - public override void Render(TextWriter output, string format = null, IFormatProvider formatProvider = null) - { - if (output == null) throw new ArgumentNullException("output"); - - output.Write('['); - var allButLast = _elements.Length - 1; - for (var i = 0; i < allButLast; ++i ) - { - _elements[i].Render(output, format, formatProvider); - output.Write(", "); - } - - if (_elements.Length > 0) - _elements[_elements.Length - 1].Render(output, format, formatProvider); - - output.Write(']'); - } - } -} \ No newline at end of file diff --git a/src/Serilog/Events/SequenceValue.cs b/src/Serilog/Events/SequenceValue.cs index bdc540df8..e2e6c94bb 100644 --- a/src/Serilog/Events/SequenceValue.cs +++ b/src/Serilog/Events/SequenceValue.cs @@ -17,6 +17,12 @@ using System.IO; using System.Linq; +#if NET40 +using IPropertyValueList = System.Collections.Generic.IList; +#else +using IPropertyValueList = System.Collections.Generic.IReadOnlyList; +#endif + namespace Serilog.Events { /// @@ -40,7 +46,7 @@ public SequenceValue(IEnumerable elements) /// /// The elements of the sequence. /// - public IReadOnlyList Elements { get { return _elements; } } + public IPropertyValueList Elements { get { return _elements; } } /// /// Render the value to the output. diff --git a/src/Serilog/Events/StructureValue-net40.cs b/src/Serilog/Events/StructureValue-net40.cs deleted file mode 100644 index 33530becc..000000000 --- a/src/Serilog/Events/StructureValue-net40.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections.Generic; -// Copyright 2013 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System.IO; -using System.Linq; - -namespace Serilog.Events -{ - /// - /// A value represented as a collection of name-value properties. - /// - public class StructureValue : LogEventPropertyValue - { - readonly string _typeTag; - readonly LogEventProperty[] _properties; - - /// - /// Construct a with the provided properties. - /// - /// Optionally, a piece of metadata describing the "type" of the - /// structure. - /// The properties of the structure. - /// - public StructureValue(IEnumerable properties, string typeTag = null) - { - if (properties == null) throw new ArgumentNullException("properties"); - _typeTag = typeTag; - _properties = properties.ToArray(); - } - - /// - /// A piece of metadata describing the "type" of the - /// structure, or null. - /// - public string TypeTag { get { return _typeTag; } } - - /// - /// The properties of the structure. - /// - /// Not presented as a dictionary because dictionary construction is - /// relatively expensive; it is cheaper to build a dictionary over properties only - /// when the structure is of interest. - public IList Properties { get { return _properties; } } - - /// - /// Render the value to the output. - /// - /// The output. - /// A format string applied to the value, or null. - /// A format provider to apply to the value, or null to use the default. - /// . - public override void Render(TextWriter output, string format = null, IFormatProvider formatProvider = null) - { - if (output == null) throw new ArgumentNullException("output"); - - if (_typeTag != null) - { - output.Write(_typeTag); - output.Write(' '); - } - output.Write("{ "); - var allButLast = _properties.Length - 1; - for (var i = 0; i < allButLast; i++) - { - var property = _properties[i]; - Render(output, property, formatProvider); - output.Write(", "); - } - - if (_properties.Length > 0) - { - var last = _properties[_properties.Length - 1]; - Render(output, last, formatProvider); - } - - output.Write(" }"); - } - - static void Render(TextWriter output, LogEventProperty property, IFormatProvider formatProvider = null) - { - output.Write(property.Name); - output.Write(": "); - property.Value.Render(output, null, formatProvider); - } - } -} \ No newline at end of file diff --git a/src/Serilog/Events/StructureValue.cs b/src/Serilog/Events/StructureValue.cs index 3af1b5119..ff14305df 100644 --- a/src/Serilog/Events/StructureValue.cs +++ b/src/Serilog/Events/StructureValue.cs @@ -17,6 +17,12 @@ using System.IO; using System.Linq; +#if NET40 +using IPropertyList = System.Collections.Generic.IList; +#else +using IPropertyList = System.Collections.Generic.IReadOnlyList; +#endif + namespace Serilog.Events { /// @@ -53,7 +59,7 @@ public StructureValue(IEnumerable properties, string typeTag = /// Not presented as a dictionary because dictionary construction is /// relatively expensive; it is cheaper to build a dictionary over properties only /// when the structure is of interest. - public IReadOnlyList Properties { get { return _properties; } } + public IPropertyList Properties { get { return _properties; } } /// /// Render the value to the output. diff --git a/src/Serilog/Formatting/Display/LogEventPropertyMessageValue-net40.cs b/src/Serilog/Formatting/Display/LogEventPropertyMessageValue-net40.cs deleted file mode 100644 index 4498b94bf..000000000 --- a/src/Serilog/Formatting/Display/LogEventPropertyMessageValue-net40.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2013 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.IO; -using Serilog.Events; - -namespace Serilog.Formatting.Display -{ - class LogEventPropertyMessageValue : LogEventPropertyValue - { - readonly MessageTemplate _template; - readonly IDictionary _properties; - - public LogEventPropertyMessageValue(MessageTemplate template, IDictionary properties) - { - _template = template; - _properties = properties; - } - - public override void Render(TextWriter output, string format = null, IFormatProvider formatProvider = null) - { - _template.Render(_properties, output, formatProvider); - } - } -} diff --git a/src/Serilog/Formatting/Display/LogEventPropertyMessageValue.cs b/src/Serilog/Formatting/Display/LogEventPropertyMessageValue.cs index 791561c63..7b5c78a2b 100644 --- a/src/Serilog/Formatting/Display/LogEventPropertyMessageValue.cs +++ b/src/Serilog/Formatting/Display/LogEventPropertyMessageValue.cs @@ -13,18 +13,23 @@ // limitations under the License. using System; -using System.Collections.Generic; using System.IO; using Serilog.Events; +#if NET40 +using IPropertyDictionary = System.Collections.Generic.IDictionary; +#else +using IPropertyDictionary = System.Collections.Generic.IReadOnlyDictionary; +#endif + namespace Serilog.Formatting.Display { class LogEventPropertyMessageValue : LogEventPropertyValue { readonly MessageTemplate _template; - readonly IReadOnlyDictionary _properties; + readonly IPropertyDictionary _properties; - public LogEventPropertyMessageValue(MessageTemplate template, IReadOnlyDictionary properties) + public LogEventPropertyMessageValue(MessageTemplate template, IPropertyDictionary properties) { _template = template; _properties = properties; diff --git a/src/Serilog/Formatting/Display/OutputProperties-net40.cs b/src/Serilog/Formatting/Display/OutputProperties-net40.cs deleted file mode 100644 index 36e7a5588..000000000 --- a/src/Serilog/Formatting/Display/OutputProperties-net40.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2013 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.Linq; -using Serilog.Events; - -namespace Serilog.Formatting.Display -{ - /// - /// Describes the properties available in standard message template-based - /// output format strings. - /// - public static class OutputProperties - { - /// - /// The message rendered from the log event. - /// - public const string MessagePropertyName = "Message"; - - /// - /// The timestamp of the log event. - /// - public const string TimestampPropertyName = "Timestamp"; - - /// - /// The level of the log event. - /// - public const string LevelPropertyName = "Level"; - - /// - /// A new line. - /// - public const string NewLinePropertyName = "NewLine"; - - /// - /// The exception associated with the log event. - /// - public const string ExceptionPropertyName = "Exception"; - - /// - /// Create properties from the provided log event. - /// - /// The log event. - /// A dictionary with properties representing the log event. - public static IDictionary GetOutputProperties(LogEvent logEvent) - { - var result = logEvent.Properties.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - - // "Special" output properties like Message will override any properties with the same name - // when used in format strings; this doesn't affect the rendering of the message template, - // which uses only the log event properties. - - result[MessagePropertyName] = new LogEventPropertyMessageValue(logEvent.MessageTemplate, logEvent.Properties); - result[TimestampPropertyName] = new ScalarValue(logEvent.Timestamp); - result[LevelPropertyName] = new ScalarValue(logEvent.Level); - result[NewLinePropertyName] = new LiteralStringValue(Environment.NewLine); - - var exception = logEvent.Exception == null ? "" : (logEvent.Exception + Environment.NewLine); - result[ExceptionPropertyName] = new LiteralStringValue(exception); - - return result; - } - } -} diff --git a/src/Serilog/Formatting/Display/OutputProperties.cs b/src/Serilog/Formatting/Display/OutputProperties.cs index 62ad6f987..4ab6859c2 100644 --- a/src/Serilog/Formatting/Display/OutputProperties.cs +++ b/src/Serilog/Formatting/Display/OutputProperties.cs @@ -17,6 +17,12 @@ using System.Linq; using Serilog.Events; +#if NET40 +using IPropertyDictionary = System.Collections.Generic.IDictionary; +#else +using IPropertyDictionary = System.Collections.Generic.IReadOnlyDictionary; +#endif + namespace Serilog.Formatting.Display { /// @@ -55,7 +61,7 @@ public static class OutputProperties /// /// The log event. /// A dictionary with properties representing the log event. - public static IReadOnlyDictionary GetOutputProperties(LogEvent logEvent) + public static IPropertyDictionary GetOutputProperties(LogEvent logEvent) { var result = logEvent.Properties.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); diff --git a/src/Serilog/Formatting/Json/JsonFormatter-net40.cs b/src/Serilog/Formatting/Json/JsonFormatter-net40.cs deleted file mode 100644 index 2671d622f..000000000 --- a/src/Serilog/Formatting/Json/JsonFormatter-net40.cs +++ /dev/null @@ -1,463 +0,0 @@ -// Copyright 2014 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Text; -using Serilog.Events; -using Serilog.Parsing; - -namespace Serilog.Formatting.Json -{ - /// - /// Formats log events in a simple JSON structure. Instances of this class - /// are safe for concurrent access by multiple threads. - /// - public class JsonFormatter : ITextFormatter - { - readonly bool _omitEnclosingObject; - readonly string _closingDelimiter; - readonly bool _renderMessage; - readonly IFormatProvider _formatProvider; - readonly IDictionary> _literalWriters; - - /// - /// Construct a . Obsolete, please use named arguments - /// when calling this constructor. - /// - [Obsolete("Use named arguments with this method to guarantee forwards-compatibility."), EditorBrowsable(EditorBrowsableState.Never)] - public JsonFormatter(bool omitEnclosingObjectObsolete) - : this(omitEnclosingObject: omitEnclosingObjectObsolete) - { - } - - /// - /// Construct a . - /// - /// If true, the properties of the event will be written to - /// the output without enclosing braces. Otherwise, if false, each event will be written as a well-formed - /// JSON object. - /// A string that will be written after each log event is formatted. - /// If null, will be used. Ignored if - /// is true. - /// If true, the message will be rendered and written to the output as a - /// property named RenderedMessage. - /// Supplies culture-specific formatting information, or null. - public JsonFormatter( - bool omitEnclosingObject = false, - string closingDelimiter = null, - bool renderMessage = false, - IFormatProvider formatProvider = null) - { - _omitEnclosingObject = omitEnclosingObject; - _closingDelimiter = closingDelimiter ?? Environment.NewLine; - _renderMessage = renderMessage; - _formatProvider = formatProvider; - - _literalWriters = new Dictionary> - { - { typeof(bool), (v, q, w) => WriteBoolean((bool)v, w) }, - { typeof(char), (v, q, w) => WriteString(((char)v).ToString(), w) }, - { typeof(byte), WriteToString }, - { typeof(sbyte), WriteToString }, - { typeof(short), WriteToString }, - { typeof(ushort), WriteToString }, - { typeof(int), WriteToString }, - { typeof(uint), WriteToString }, - { typeof(long), WriteToString }, - { typeof(ulong), WriteToString }, - { typeof(float), WriteToString }, - { typeof(double), WriteToString }, - { typeof(decimal), WriteToString }, - { typeof(string), (v, q, w) => WriteString((string)v, w) }, - { typeof(DateTime), (v, q, w) => WriteDateTime((DateTime)v, w) }, - { typeof(DateTimeOffset), (v, q, w) => WriteOffset((DateTimeOffset)v, w) }, - { typeof(ScalarValue), (v, q, w) => WriteLiteral(((ScalarValue)v).Value, w, q) }, - { typeof(SequenceValue), (v, q, w) => WriteSequence(((SequenceValue)v).Elements, w) }, - { typeof(DictionaryValue), (v, q, w) => WriteDictionary(((DictionaryValue)v).Elements, w) }, - { typeof(StructureValue), (v, q, w) => WriteStructure(((StructureValue)v).TypeTag, ((StructureValue)v).Properties, w) }, - }; - } - - /// - /// Format the log event into the output. - /// - /// The event to format. - /// The output. - public void Format(LogEvent logEvent, TextWriter output) - { - if (logEvent == null) throw new ArgumentNullException("logEvent"); - if (output == null) throw new ArgumentNullException("output"); - - if (!_omitEnclosingObject) - output.Write("{"); - - var delim = ""; - WriteTimestamp(logEvent.Timestamp, ref delim, output); - WriteLevel(logEvent.Level, ref delim, output); - WriteMessageTemplate(logEvent.MessageTemplate.Text, ref delim, output); - if (_renderMessage) - { - var message = logEvent.RenderMessage(_formatProvider); - WriteRenderedMessage(message, ref delim, output); - } - - if (logEvent.Exception != null) - WriteException(logEvent.Exception, ref delim, output); - - if (logEvent.Properties.Count != 0) - WriteProperties(logEvent.Properties, output); - - var tokensWithFormat = logEvent.MessageTemplate.Tokens - .OfType() - .Where(pt => pt.Format != null) - .GroupBy(pt => pt.PropertyName) - .ToArray(); - - if (tokensWithFormat.Length != 0) - { - WriteRenderings(tokensWithFormat, logEvent.Properties, output); - - - } - - if (!_omitEnclosingObject) - { - output.Write("}"); - output.Write(_closingDelimiter); - } - } - - /// - /// Writes out individual renderings of attached properties - /// - protected virtual void WriteRenderings(IGrouping[] tokensWithFormat, IDictionary properties, TextWriter output) - { - output.Write(",\"{0}\":{{", "Renderings"); - WriteRenderingsValues(tokensWithFormat, properties, output); - output.Write("}"); - } - - /// - /// Writes out the values of individual renderings of attached properties - /// - protected virtual void WriteRenderingsValues(IGrouping[] tokensWithFormat, IDictionary properties, TextWriter output) - { - var rdelim = ""; - foreach (var ptoken in tokensWithFormat) - { - output.Write(rdelim); - rdelim = ","; - output.Write("\""); - output.Write(ptoken.Key); - output.Write("\":["); - - var fdelim = ""; - foreach (var format in ptoken) - { - output.Write(fdelim); - fdelim = ","; - - output.Write("{"); - var eldelim = ""; - - WriteJsonProperty("Format", format.Format, ref eldelim, output); - - var sw = new StringWriter(); - format.Render(properties, sw); - WriteJsonProperty("Rendering", sw.ToString(), ref eldelim, output); - - output.Write("}"); - } - - output.Write("]"); - } - } - - /// - /// Writes out the attached properties - /// - protected virtual void WriteProperties(IDictionary properties, TextWriter output) - { - output.Write(",\"{0}\":{{", "Properties"); - WritePropertiesValues(properties, output); - output.Write("}"); - } - - /// - /// Writes out the attached properties values - /// - protected virtual void WritePropertiesValues(IDictionary properties, TextWriter output) - { - var precedingDelimiter = ""; - foreach (var property in properties) - { - WriteJsonProperty(property.Key, property.Value, ref precedingDelimiter, output); - } - } - - /// - /// Writes out the attached exception - /// - protected virtual void WriteException(Exception exception, ref string delim, TextWriter output) - { - WriteJsonProperty("Exception", exception, ref delim, output); - } - - /// - /// (Optionally) writes out the rendered message - /// - protected virtual void WriteRenderedMessage(string message, ref string delim, TextWriter output) - { - WriteJsonProperty("RenderedMessage", message, ref delim, output); - } - - /// - /// Writes out the message template for the logevent. - /// - protected virtual void WriteMessageTemplate(string template, ref string delim, TextWriter output) - { - WriteJsonProperty("MessageTemplate", template, ref delim, output); - } - - /// - /// Writes out the log level - /// - protected virtual void WriteLevel(LogEventLevel level, ref string delim, TextWriter output) - { - WriteJsonProperty("Level", level, ref delim, output); - } - - /// - /// Writes out the log timestamp - /// - protected virtual void WriteTimestamp(DateTimeOffset timestamp, ref string delim, TextWriter output) - { - WriteJsonProperty("Timestamp", timestamp, ref delim, output); - } - - /// - /// Writes out a structure property - /// - protected virtual void WriteStructure(string typeTag, IEnumerable properties, TextWriter output) - { - output.Write("{"); - - var delim = ""; - if (typeTag != null) - WriteJsonProperty("_typeTag", typeTag, ref delim, output); - - foreach (var property in properties) - WriteJsonProperty(property.Name, property.Value, ref delim, output); - - output.Write("}"); - } - - /// - /// Writes out a sequence property - /// - protected virtual void WriteSequence(IEnumerable elements, TextWriter output) - { - output.Write("["); - var delim = ""; - foreach (var value in elements) - { - output.Write(delim); - delim = ","; - WriteLiteral(value, output); - } - output.Write("]"); - } - - /// - /// Writes out a dictionary - /// - protected virtual void WriteDictionary(IDictionary elements, TextWriter output) - { - output.Write("{"); - var delim = ""; - foreach (var e in elements) - { - output.Write(delim); - delim = ","; - WriteLiteral(e.Key, output, true); - output.Write(":"); - WriteLiteral(e.Value, output); - } - output.Write("}"); - } - - /// - /// Writes out a json property with the specified value on output writer - /// - protected virtual void WriteJsonProperty(string name, object value, ref string precedingDelimiter, TextWriter output) - { - output.Write(precedingDelimiter); - output.Write("\""); - output.Write(name); - output.Write("\":"); - WriteLiteral(value, output); - precedingDelimiter = ","; - } - - /// - /// Allows a subclass to write out objects that have no configured literal writer. - /// - /// The value to be written as a json construct - /// The writer to write on - protected virtual void WriteLiteralValue(object value, TextWriter output) - { - WriteString(value.ToString(), output); - } - - void WriteLiteral(object value, TextWriter output, bool forceQuotation = false) - { - if (value == null) - { - output.Write("null"); - return; - } - - Action writer; - if (_literalWriters.TryGetValue(value.GetType(), out writer)) - { - writer(value, forceQuotation, output); - return; - } - WriteLiteralValue(value, output); - - } - - static void WriteToString(object number, bool quote, TextWriter output) - { - if (quote) output.Write('"'); - - var fmt = number as IFormattable; - if (fmt != null) - output.Write(fmt.ToString(null, CultureInfo.InvariantCulture)); - else - output.Write(number.ToString()); - - if (quote) output.Write('"'); - } - - static void WriteBoolean(bool value, TextWriter output) - { - output.Write(value ? "true" : "false"); - } - - static void WriteOffset(DateTimeOffset value, TextWriter output) - { - output.Write("\""); - output.Write(value.ToString("o")); - output.Write("\""); - } - - static void WriteDateTime(DateTime value, TextWriter output) - { - output.Write("\""); - output.Write(value.ToString("o")); - output.Write("\""); - } - - static void WriteString(string value, TextWriter output) - { - var content = Escape(value); - output.Write("\""); - output.Write(content); - output.Write("\""); - } - - /// - /// Perform simple JSON string escaping on . - /// - /// A raw string. - /// A JSON-escaped version of . - public static string Escape(string s) - { - if (s == null) return null; - - StringBuilder escapedResult = null; - var cleanSegmentStart = 0; - for (var i = 0; i < s.Length; ++i) - { - var c = s[i]; - if (c < (char)32 || c == '\\' || c == '"') - { - - if (escapedResult == null) - escapedResult = new StringBuilder(); - - escapedResult.Append(s.Substring(cleanSegmentStart, i - cleanSegmentStart)); - cleanSegmentStart = i + 1; - - switch (c) - { - case '"': - { - escapedResult.Append("\\\""); - break; - } - case '\\': - { - escapedResult.Append("\\\\"); - break; - } - case '\n': - { - escapedResult.Append("\\n"); - break; - } - case '\r': - { - escapedResult.Append("\\r"); - break; - } - case '\f': - { - escapedResult.Append("\\f"); - break; - } - case '\t': - { - escapedResult.Append("\\t"); - break; - } - default: - { - escapedResult.Append("\\u"); - escapedResult.Append(((int)c).ToString("X4")); - break; - } - } - } - } - - if (escapedResult != null) - { - if (cleanSegmentStart != s.Length) - escapedResult.Append(s.Substring(cleanSegmentStart)); - - return escapedResult.ToString(); - } - - return s; - } - } -} diff --git a/src/Serilog/Formatting/Json/JsonFormatter.cs b/src/Serilog/Formatting/Json/JsonFormatter.cs index 8688112b0..bf13f0726 100644 --- a/src/Serilog/Formatting/Json/JsonFormatter.cs +++ b/src/Serilog/Formatting/Json/JsonFormatter.cs @@ -23,6 +23,15 @@ using Serilog.Events; using Serilog.Parsing; +#if NET40 +using IPropertyDictionary = System.Collections.Generic.IDictionary; +using IScalarDictionary = System.Collections.Generic.IDictionary; +#else +using IPropertyDictionary = System.Collections.Generic.IReadOnlyDictionary; +using IScalarDictionary = System.Collections.Generic.IReadOnlyDictionary; +#endif + + namespace Serilog.Formatting.Json { /// @@ -145,7 +154,7 @@ public void Format(LogEvent logEvent, TextWriter output) /// /// Writes out individual renderings of attached properties /// - protected virtual void WriteRenderings(IGrouping[] tokensWithFormat, IReadOnlyDictionary properties, TextWriter output) + protected virtual void WriteRenderings(IGrouping[] tokensWithFormat, IPropertyDictionary properties, TextWriter output) { output.Write(",\"{0}\":{{", "Renderings"); WriteRenderingsValues(tokensWithFormat, properties, output); @@ -155,7 +164,7 @@ protected virtual void WriteRenderings(IGrouping[] tokens /// /// Writes out the values of individual renderings of attached properties /// - protected virtual void WriteRenderingsValues(IGrouping[] tokensWithFormat, IReadOnlyDictionary properties, TextWriter output) + protected virtual void WriteRenderingsValues(IGrouping[] tokensWithFormat, IPropertyDictionary properties, TextWriter output) { var rdelim = ""; foreach (var ptoken in tokensWithFormat) @@ -191,7 +200,7 @@ protected virtual void WriteRenderingsValues(IGrouping[] /// /// Writes out the attached properties /// - protected virtual void WriteProperties(IReadOnlyDictionary properties, TextWriter output) + protected virtual void WriteProperties(IPropertyDictionary properties, TextWriter output) { output.Write(",\"{0}\":{{", "Properties"); WritePropertiesValues(properties, output); @@ -201,7 +210,7 @@ protected virtual void WriteProperties(IReadOnlyDictionary /// Writes out the attached properties values /// - protected virtual void WritePropertiesValues(IReadOnlyDictionary properties, TextWriter output) + protected virtual void WritePropertiesValues(IPropertyDictionary properties, TextWriter output) { var precedingDelimiter = ""; foreach (var property in properties) @@ -286,7 +295,7 @@ protected virtual void WriteSequence(IEnumerable elements, TextWriter output) /// /// Writes out a dictionary /// - protected virtual void WriteDictionary(IReadOnlyDictionary elements, TextWriter output) + protected virtual void WriteDictionary(IScalarDictionary elements, TextWriter output) { output.Write("{"); var delim = ""; diff --git a/src/Serilog.FullNetFx/LoggerConfigurationFullNetFxExtensions.cs b/src/Serilog/LoggerConfigurationFullNetFxExtensions.cs similarity index 99% rename from src/Serilog.FullNetFx/LoggerConfigurationFullNetFxExtensions.cs rename to src/Serilog/LoggerConfigurationFullNetFxExtensions.cs index 52392f212..54e83ae87 100644 --- a/src/Serilog.FullNetFx/LoggerConfigurationFullNetFxExtensions.cs +++ b/src/Serilog/LoggerConfigurationFullNetFxExtensions.cs @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#if !PROFILE259 using System; using System.Collections.Generic; using System.ComponentModel; @@ -23,13 +24,16 @@ using Serilog.Events; using Serilog.Formatting.Display; using Serilog.Formatting.Raw; -using Serilog.Settings.AppSettings; using Serilog.Settings.KeyValuePairs; using Serilog.Sinks.DiagnosticTrace; using Serilog.Sinks.IOFile; using Serilog.Sinks.RollingFile; using Serilog.Sinks.SystemConsole; +#if !DNXCORE50 +using Serilog.Settings.AppSettings; +#endif + namespace Serilog { /// @@ -65,6 +69,7 @@ public static LoggerConfiguration Console( return sinkConfiguration.Sink(new ConsoleSink(formatter), restrictedToMinimumLevel); } +#if !DNXCORE50 /// /// Writes log events to , using color to differentiate /// between levels. @@ -86,6 +91,7 @@ public static LoggerConfiguration ColoredConsole( if (outputTemplate == null) throw new ArgumentNullException("outputTemplate"); return sinkConfiguration.Sink(new ColoredConsoleSink(outputTemplate, formatProvider), restrictedToMinimumLevel); } +#endif /// /// Write log events in a simple text dump format to the specified file. @@ -208,6 +214,7 @@ public static LoggerConfiguration Trace( return sinkConfiguration.Sink(new DiagnosticTraceSink(formatter), restrictedToMinimumLevel); } +#if !DNXCORE50 /// /// Enrich log events with properties from . /// @@ -220,6 +227,7 @@ public static LoggerConfiguration FromLogContext( if (enrichmentConfiguration == null) throw new ArgumentNullException("enrichmentConfiguration"); return enrichmentConfiguration.With(); } +#endif /// /// Enrich log events with a ThreadId property containing the current . @@ -258,6 +266,7 @@ public static LoggerConfiguration WithMachineName( return enrichmentConfiguration.With(); } +#if !DNXCORE50 /// /// Reads the <appSettings> element of App.config or Web.config, searching for for keys /// that look like: serilog:*, which are used to configure @@ -274,5 +283,7 @@ public static LoggerConfiguration AppSettings( if (settingConfiguration == null) throw new ArgumentNullException("settingConfiguration"); return settingConfiguration.Settings(new AppSettingsSettings()); } +#endif } } +#endif diff --git a/src/Serilog/Parameters/GetablePropertyFinder.cs b/src/Serilog/Parameters/GetablePropertyFinder.cs index 17e92b7e3..96c1bdac9 100644 --- a/src/Serilog/Parameters/GetablePropertyFinder.cs +++ b/src/Serilog/Parameters/GetablePropertyFinder.cs @@ -17,6 +17,10 @@ using System.Linq; using System.Reflection; +#if NET40 +using Serilog.Platform; +#endif + namespace Serilog.Parameters { static class GetablePropertyFinder @@ -30,8 +34,11 @@ internal static IEnumerable GetPropertiesRecursive(this Type type) while (currentTypeInfo.AsType() != typeof(object)) { var unseenProperties = currentTypeInfo.DeclaredProperties.Where(p => p.CanRead && - p.GetMethod.IsPublic && - !p.GetMethod.IsStatic && +#if NET40 + p.GetGetMethod().IsPublic && !p.GetGetMethod().IsStatic && +#else + p.GetMethod.IsPublic && !p.GetMethod.IsStatic && +#endif (p.Name != "Item" || p.GetIndexParameters().Length == 0) && !seenNames.Contains(p.Name)); diff --git a/src/Serilog/Parameters/PropertyValueConverter-net40.cs b/src/Serilog/Parameters/PropertyValueConverter-net40.cs deleted file mode 100644 index ce848bfcc..000000000 --- a/src/Serilog/Parameters/PropertyValueConverter-net40.cs +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright 2014 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using Serilog.Core; -using Serilog.Debugging; -using Serilog.Events; -using Serilog.Parsing; -using Serilog.Policies; - -namespace Serilog.Parameters -{ - // Values in Serilog are simplified down into a lowest-common-denominator internal - // type system so that there is a better chance of code written with one sink in - // mind working correctly with any other. This technique also makes the programmer - // writing a log event (roughly) in control of the cost of recording that event. - partial class PropertyValueConverter : ILogEventPropertyFactory, ILogEventPropertyValueFactory - { - static readonly HashSet BuiltInScalarTypes = new HashSet - { - typeof(bool), - typeof(byte), typeof(short), typeof(ushort), typeof(int), typeof(uint), - typeof(long), typeof(ulong), typeof(float), typeof(double), typeof(decimal), - typeof(string), - typeof(DateTime), typeof(DateTimeOffset), typeof(TimeSpan), - typeof(Guid), typeof(Uri) - }; - - readonly IDestructuringPolicy[] _destructuringPolicies; - readonly IScalarConversionPolicy[] _scalarConversionPolicies; - readonly int _maximumDestructuringDepth; - - public PropertyValueConverter(int maximumDestructuringDepth, IEnumerable additionalScalarTypes, IEnumerable additionalDestructuringPolicies) - { - if (additionalScalarTypes == null) throw new ArgumentNullException("additionalScalarTypes"); - if (additionalDestructuringPolicies == null) throw new ArgumentNullException("additionalDestructuringPolicies"); - if (maximumDestructuringDepth < 0) throw new ArgumentOutOfRangeException("maximumDestructuringDepth"); - - _maximumDestructuringDepth = maximumDestructuringDepth; - - _scalarConversionPolicies = new IScalarConversionPolicy[] - { - new SimpleScalarConversionPolicy(BuiltInScalarTypes.Concat(additionalScalarTypes)), - new NullableScalarConversionPolicy(), - new EnumScalarConversionPolicy(), - new ByteArrayScalarConversionPolicy(), - new ReflectionTypesScalarConversionPolicy() - }; - - _destructuringPolicies = additionalDestructuringPolicies - .Concat(new [] - { - new DelegateDestructuringPolicy() - }) - .ToArray(); - } - - public LogEventProperty CreateProperty(string name, object value, bool destructureObjects = false) - { - return new LogEventProperty(name, CreatePropertyValue(value, destructureObjects)); - } - - public LogEventPropertyValue CreatePropertyValue(object value, bool destructureObjects = false) - { - return CreatePropertyValue(value, destructureObjects, 1); - } - - public LogEventPropertyValue CreatePropertyValue(object value, Destructuring destructuring) - { - return CreatePropertyValue(value, destructuring, 1); - } - - LogEventPropertyValue CreatePropertyValue(object value, bool destructureObjects, int depth) - { - return CreatePropertyValue( - value, - destructureObjects ? - Destructuring.Destructure : - Destructuring.Default, - depth); - } - - LogEventPropertyValue CreatePropertyValue(object value, Destructuring destructuring, int depth) - { - if (value == null) - return new ScalarValue(null); - - if (destructuring == Destructuring.Stringify) - return new ScalarValue(value.ToString()); - - var valueType = value.GetType(); - var limiter = new DepthLimiter(depth, _maximumDestructuringDepth, this); - - foreach (var scalarConversionPolicy in _scalarConversionPolicies) - { - ScalarValue converted; - if (scalarConversionPolicy.TryConvertToScalar(value, limiter, out converted)) - return converted; - } - - if (destructuring == Destructuring.Destructure) - { - foreach (var destructuringPolicy in _destructuringPolicies) - { - LogEventPropertyValue result; - if (destructuringPolicy.TryDestructure(value, limiter, out result)) - return result; - } - } - - var enumerable = value as IEnumerable; - if (enumerable != null) - { - // Only dictionaries with 'scalar' keys are permitted, as - // more complex keys may not serialize to unique values for - // representation in sinks. This check strengthens the expectation - // that resulting dictionary is representable in JSON as well - // as richer formats (e.g. XML, .NET type-aware...). - // Only actual dictionaries are supported, as arbitrary types - // can implement multiple IDictionary interfaces and thus introduce - // multiple different interpretations. - if (IsValueTypeDictionary(valueType)) - { - return new DictionaryValue(enumerable.Cast() - .Select(kvp => new KeyValuePair( - (ScalarValue)limiter.CreatePropertyValue(kvp.Key, destructuring), - limiter.CreatePropertyValue(kvp.Value, destructuring))) - .Where(kvp => kvp.Key.Value != null)); - } - - return - new SequenceValue( - enumerable.Cast().Select(o => limiter.CreatePropertyValue(o, destructuring))); - } - - if (destructuring == Destructuring.Destructure) - { - var typeTag = value.GetType().Name; - if (typeTag.Length <= 0 || !char.IsLetter(typeTag[0])) - typeTag = null; - - return new StructureValue(GetProperties(value, limiter), typeTag); - } - - return new ScalarValue(value.ToString()); - } - - bool IsValueTypeDictionary(Type valueType) - { - return valueType.IsGenericType && - valueType.GetGenericTypeDefinition() == typeof(Dictionary<,>) && - IsValidDictionaryKeyType(valueType.GetGenericArguments()[0]); - } - - bool IsValidDictionaryKeyType(Type valueType) - { - return BuiltInScalarTypes.Contains(valueType) || valueType.IsEnum; - } - - static IEnumerable GetProperties(object value, ILogEventPropertyValueFactory recursive) - { - var valueType = value.GetType(); - var props = valueType.GetProperties().Where(p => p.CanRead && - p.GetGetMethod().IsPublic && - !p.GetGetMethod().IsStatic && - (p.Name != "Item" || p.GetIndexParameters().Length == 0)); - - foreach (var prop in props) - { - object propValue; - try - { - propValue = prop.GetValue(value, null); - } - catch (TargetParameterCountException) - { - SelfLog.WriteLine("The property accessor {0} is a non-default indexer", prop); - continue; - } - catch (TargetInvocationException ex) - { - SelfLog.WriteLine("The property accessor {0} threw exception {1}", prop, ex); - propValue = "The property accessor threw an exception: " + ex.InnerException.GetType().Name; - } - yield return new LogEventProperty(prop.Name, recursive.CreatePropertyValue(propValue, true)); - } - } - } -} diff --git a/src/Serilog/Parameters/PropertyValueConverter.cs b/src/Serilog/Parameters/PropertyValueConverter.cs index 335ef65a6..991516c28 100644 --- a/src/Serilog/Parameters/PropertyValueConverter.cs +++ b/src/Serilog/Parameters/PropertyValueConverter.cs @@ -23,6 +23,10 @@ using Serilog.Parsing; using Serilog.Policies; +#if NET40 +using Serilog.Platform; +#endif + namespace Serilog.Parameters { // Values in Serilog are simplified down into a lowest-common-denominator internal @@ -162,9 +166,20 @@ LogEventPropertyValue CreatePropertyValue(object value, Destructuring destructur bool IsValueTypeDictionary(Type valueType) { - return valueType.IsConstructedGenericType && + return +#if NET40 + valueType.IsGenericType && +#else + valueType.IsConstructedGenericType && +#endif valueType.GetGenericTypeDefinition() == typeof (Dictionary<,>) && - IsValidDictionaryKeyType(valueType.GenericTypeArguments[0]); + IsValidDictionaryKeyType( +#if NET40 + valueType.GetGenericArguments() +#else + valueType.GenericTypeArguments +#endif + [0]); } bool IsValidDictionaryKeyType(Type valueType) @@ -180,7 +195,11 @@ static IEnumerable GetProperties(object value, ILogEventProper object propValue; try { +#if NET40 + propValue = prop.GetValue(value, null); +#else propValue = prop.GetValue(value); +#endif } catch (TargetParameterCountException) { diff --git a/src/Serilog/Parsing/MessageTemplateToken-net40.cs b/src/Serilog/Parsing/MessageTemplateToken-net40.cs deleted file mode 100644 index 09dcf0071..000000000 --- a/src/Serilog/Parsing/MessageTemplateToken-net40.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2013 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.IO; -using Serilog.Events; - -namespace Serilog.Parsing -{ - /// - /// An element parsed from a message template string. - /// - public abstract class MessageTemplateToken - { - readonly int _startIndex; - - /// - /// Construct a . - /// - /// The token's start index in the template. - protected MessageTemplateToken(int startIndex) - { - _startIndex = startIndex; - } - - /// - /// The token's start index in the template. - /// - public int StartIndex - { - get { return _startIndex; } - } - - /// - /// The token's length. - /// - public abstract int Length { get; } - - /// - /// Render the token to the output. - /// - /// Properties that may be represented by the token. - /// Output for the rendered string. - /// Supplies culture-specific formatting information, or null. - public abstract void Render(IDictionary properties, TextWriter output, IFormatProvider formatProvider = null); - } -} \ No newline at end of file diff --git a/src/Serilog/Parsing/MessageTemplateToken.cs b/src/Serilog/Parsing/MessageTemplateToken.cs index cc630fc2c..859486297 100644 --- a/src/Serilog/Parsing/MessageTemplateToken.cs +++ b/src/Serilog/Parsing/MessageTemplateToken.cs @@ -13,9 +13,13 @@ // limitations under the License. using System; -using System.Collections.Generic; using System.IO; -using Serilog.Events; + +#if NET40 +using IPropertyDictionary = System.Collections.Generic.IDictionary; +#else +using IPropertyDictionary = System.Collections.Generic.IReadOnlyDictionary; +#endif namespace Serilog.Parsing { @@ -54,6 +58,6 @@ public int StartIndex /// Properties that may be represented by the token. /// Output for the rendered string. /// Supplies culture-specific formatting information, or null. - public abstract void Render(IReadOnlyDictionary properties, TextWriter output, IFormatProvider formatProvider = null); + public abstract void Render(IPropertyDictionary properties, TextWriter output, IFormatProvider formatProvider = null); } } \ No newline at end of file diff --git a/src/Serilog/Parsing/PropertyToken-net40.cs b/src/Serilog/Parsing/PropertyToken-net40.cs deleted file mode 100644 index 6ec52b867..000000000 --- a/src/Serilog/Parsing/PropertyToken-net40.cs +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright 2013 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using Serilog.Events; -using System.ComponentModel; - -namespace Serilog.Parsing -{ - /// - /// A message template token representing a log event property. - /// - public class PropertyToken : MessageTemplateToken - { - readonly string _propertyName; - readonly string _format; - readonly Alignment? _alignment; - readonly Destructuring _destructuring; - readonly string _rawText; - readonly int? _position; - - /// - /// Construct a . - /// - /// The name of the property. - /// The token as it appears in the message template. - /// The format applied to the property, if any. - /// The destructuring strategy applied to the property, if any. - /// - [Obsolete("Use named arguments with this method to guarantee forwards-compatibility."), EditorBrowsable(EditorBrowsableState.Never)] - public PropertyToken(string propertyName, string rawText, string formatObsolete, Destructuring destructuringObsolete) - : this(propertyName, rawText, formatObsolete, null, destructuringObsolete) - { - } - - /// - /// Construct a . - /// - /// The name of the property. - /// The token as it appears in the message template. - /// The format applied to the property, if any. - /// The alignment applied to the property, if any. - /// The destructuring strategy applied to the property, if any. - /// The token's start index in the template. - /// - public PropertyToken(string propertyName, string rawText, string format = null, Alignment? alignment = null, Destructuring destructuring = Destructuring.Default, int startIndex = -1) - : base(startIndex) - { - if (propertyName == null) - throw new ArgumentNullException("propertyName"); - if (rawText == null) - throw new ArgumentNullException("rawText"); - _propertyName = propertyName; - _format = format; - _destructuring = destructuring; - _rawText = rawText; - _alignment = alignment; - - int position; - if (int.TryParse(_propertyName, NumberStyles.None, CultureInfo.InvariantCulture, out position) && - position >= 0) - { - _position = position; - } - } - - /// - /// The token's length. - /// - public override int Length - { - get { return _rawText.Length; } - } - - /// - /// Render the token to the output. - /// - /// Properties that may be represented by the token. - /// Output for the rendered string. - /// Supplies culture-specific formatting information, or null. - public override void Render(IDictionary properties, TextWriter output, IFormatProvider formatProvider = null) - { - if (properties == null) throw new ArgumentNullException("properties"); - if (output == null) throw new ArgumentNullException("output"); - LogEventPropertyValue propertyValue; - if (properties.TryGetValue(_propertyName, out propertyValue)) - { - if (_alignment.HasValue) - { - var valueOutput = new StringWriter(); - propertyValue.Render(valueOutput, _format, formatProvider); - var value = valueOutput.ToString(); - - if (value.Length < _alignment.Value.Width) - { - var pad = _alignment.Value.Width - value.Length; - - if (_alignment.Value.Direction == AlignmentDirection.Right) - output.Write(new string(' ', pad)); - - output.Write(value); - - if (_alignment.Value.Direction == AlignmentDirection.Left) - output.Write(new string(' ', pad)); - } - else - output.Write(value); - } - else - propertyValue.Render(output, _format, formatProvider); - } - else - output.Write(_rawText); - } - - /// - /// The property name. - /// - public string PropertyName { get { return _propertyName; } } - - /// - /// Destructuring strategy applied to the property. - /// - public Destructuring Destructuring { get { return _destructuring; } } - - /// - /// Format applied to the property. - /// - public string Format { get { return _format; } } - - /// - /// Alignment applied to the property. - /// - public Alignment? Alignment { get { return _alignment; } } - - /// - /// True if the property name is a positional index; otherwise, false. - /// - public bool IsPositional - { - get { return _position != null; } - } - - /// - /// Try to get the integer value represented by the property name. - /// - /// The integer value, if present. - /// True if the property is positional, otherwise false. - public bool TryGetPositionalValue(out int position) - { - if (_position == null) - { - position = 0; - return false; - } - - position = _position.Value; - return true; - } - - /// - /// Determines whether the specified is equal to the current . - /// - /// - /// true if the specified object is equal to the current object; otherwise, false. - /// - /// The object to compare with the current object. 2 - public override bool Equals(object obj) - { - var pt = obj as PropertyToken; - return pt != null && - pt._destructuring == _destructuring && - pt._format == _format && - pt._propertyName == _propertyName && - pt._rawText == _rawText; - } - - /// - /// Serves as a hash function for a particular type. - /// - /// - /// A hash code for the current . - /// - /// 2 - public override int GetHashCode() - { - return _propertyName.GetHashCode(); - } - - /// - /// Returns a string that represents the current object. - /// - /// - /// A string that represents the current object. - /// - /// 2 - public override string ToString() - { - return _rawText; - } - } -} \ No newline at end of file diff --git a/src/Serilog/Parsing/PropertyToken.cs b/src/Serilog/Parsing/PropertyToken.cs index 5091c20fc..8689fcb53 100644 --- a/src/Serilog/Parsing/PropertyToken.cs +++ b/src/Serilog/Parsing/PropertyToken.cs @@ -13,12 +13,17 @@ // limitations under the License. using System; -using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.IO; using Serilog.Events; +#if NET40 +using IPropertyDictionary = System.Collections.Generic.IDictionary; +#else +using IPropertyDictionary = System.Collections.Generic.IReadOnlyDictionary; +#endif + namespace Serilog.Parsing { /// @@ -90,7 +95,7 @@ public override int Length /// Properties that may be represented by the token. /// Output for the rendered string. /// Supplies culture-specific formatting information, or null. - public override void Render(IReadOnlyDictionary properties, TextWriter output, IFormatProvider formatProvider = null) + public override void Render(IPropertyDictionary properties, TextWriter output, IFormatProvider formatProvider = null) { if (properties == null) throw new ArgumentNullException("properties"); if (output == null) throw new ArgumentNullException("output"); diff --git a/src/Serilog/Parsing/TextToken-net40.cs b/src/Serilog/Parsing/TextToken-net40.cs deleted file mode 100644 index b41324689..000000000 --- a/src/Serilog/Parsing/TextToken-net40.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2013 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.IO; -using Serilog.Events; - -namespace Serilog.Parsing -{ - /// - /// A message template token representing literal text. - /// - public class TextToken : MessageTemplateToken - { - readonly string _text; - - /// - /// Construct a . - /// - /// The text of the token. - /// The token's start index in the template. - /// - public TextToken(string text, int startIndex = -1) : base(startIndex) - { - if (text == null) throw new ArgumentNullException("text"); - _text = text; - } - - /// - /// The token's length. - /// - public override int Length - { - get { return _text.Length; } - } - - /// - /// Render the token to the output. - /// - /// Properties that may be represented by the token. - /// Output for the rendered string. - /// Supplies culture-specific formatting information, or null. - public override void Render(IDictionary properties, TextWriter output, IFormatProvider formatProvider = null) - { - if (output == null) throw new ArgumentNullException("output"); - output.Write(Text); - } - - /// - /// Determines whether the specified is equal to the current . - /// - /// - /// true if the specified object is equal to the current object; otherwise, false. - /// - /// The object to compare with the current object. 2 - public override bool Equals(object obj) - { - var tt = obj as TextToken; - return tt != null && tt._text == _text; - } - - /// - /// Serves as a hash function for a particular type. - /// - /// - /// A hash code for the current . - /// - /// 2 - public override int GetHashCode() - { - return _text.GetHashCode(); - } - - /// - /// Returns a string that represents the current object. - /// - /// - /// A string that represents the current object. - /// - /// 2 - public override string ToString() - { - return Text; - } - - /// - /// The text of the token. - /// - public string Text - { - get { return _text; } - } - } -} \ No newline at end of file diff --git a/src/Serilog/Parsing/TextToken.cs b/src/Serilog/Parsing/TextToken.cs index 604fe25cb..41d0f9382 100644 --- a/src/Serilog/Parsing/TextToken.cs +++ b/src/Serilog/Parsing/TextToken.cs @@ -13,9 +13,13 @@ // limitations under the License. using System; -using System.Collections.Generic; using System.IO; -using Serilog.Events; + +#if NET40 +using IPropertyDictionary = System.Collections.Generic.IDictionary; +#else +using IPropertyDictionary = System.Collections.Generic.IReadOnlyDictionary; +#endif namespace Serilog.Parsing { @@ -52,7 +56,7 @@ public override int Length /// Properties that may be represented by the token. /// Output for the rendered string. /// Supplies culture-specific formatting information, or null. - public override void Render(IReadOnlyDictionary properties, TextWriter output, IFormatProvider formatProvider = null) + public override void Render(IPropertyDictionary properties, TextWriter output, IFormatProvider formatProvider = null) { if (output == null) throw new ArgumentNullException("output"); output.Write(Text); diff --git a/src/Serilog/Policies/EnumScalarConversionPolicy-net40.cs b/src/Serilog/Platform/TypeExtensions-net40.cs similarity index 53% rename from src/Serilog/Policies/EnumScalarConversionPolicy-net40.cs rename to src/Serilog/Platform/TypeExtensions-net40.cs index de317aa10..a9019d895 100644 --- a/src/Serilog/Policies/EnumScalarConversionPolicy-net40.cs +++ b/src/Serilog/Platform/TypeExtensions-net40.cs @@ -1,34 +1,31 @@ -// Copyright 2013 Serilog Contributors -// +// Copyright 2015 Serilog Contributors +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -using Serilog.Core; -using Serilog.Events; +using System; -namespace Serilog.Policies +#if NET40 +namespace Serilog.Platform { - class EnumScalarConversionPolicy : IScalarConversionPolicy + /// + /// Backport of .NET 4.5 TypeInfo concept + /// + static class TypeExtensions { - public bool TryConvertToScalar(object value, ILogEventPropertyValueFactory propertyValueFactory, out ScalarValue result) + public static TypeInfo GetTypeInfo(this Type type) { - if (value.GetType().IsEnum) - { - result = new ScalarValue(value); - return true; - } - - result = null; - return false; + return new TypeInfo(type); } } } +#endif diff --git a/src/Serilog/Platform/TypeInfo-net40.cs b/src/Serilog/Platform/TypeInfo-net40.cs new file mode 100644 index 000000000..c52d76800 --- /dev/null +++ b/src/Serilog/Platform/TypeInfo-net40.cs @@ -0,0 +1,98 @@ +// Copyright 2015 Serilog Contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Reflection; + +#if NET40 +namespace Serilog.Platform +{ + /// + /// Backport of .NET 4.5 TypeInfo concept + /// + internal class TypeInfo + { + readonly Type _type; + + public TypeInfo(Type type) + { + _type = type; + } + + public Type AsType() + { + return _type; + } + + public Type BaseType + { + get + { + return _type.BaseType; + } + } + + public bool IsGenericType + { + get { return _type.IsGenericType; } + } + + public Type[] GenericTypeArguments + { + get { return _type.GetGenericArguments(); } + } + + public bool IsEnum + { + get { return _type.IsEnum; } + } + + public Assembly Assembly + { + get { return _type.Assembly; } + } + + public bool IsSealed + { + get { return _type.IsSealed; } + } + + public bool IsAbstract + { + get { return _type.IsAbstract; } + } + + public bool IsNested + { + get { return _type.IsNested; } + } + + public IEnumerable DeclaredMethods + { + get { return _type.GetMethods(); } + } + + public IEnumerable DeclaredProperties + { + get { return _type.GetProperties(); } + } + + public bool IsAssignableFrom(TypeInfo targetType) + { + return _type.IsAssignableFrom(targetType._type); + } + } +} +#endif diff --git a/src/Serilog/Policies/EnumScalarConversionPolicy.cs b/src/Serilog/Policies/EnumScalarConversionPolicy.cs index ee6beafb4..55bfa5a59 100644 --- a/src/Serilog/Policies/EnumScalarConversionPolicy.cs +++ b/src/Serilog/Policies/EnumScalarConversionPolicy.cs @@ -16,6 +16,10 @@ using Serilog.Core; using Serilog.Events; +#if NET40 +using Serilog.Platform; +#endif + namespace Serilog.Policies { class EnumScalarConversionPolicy : IScalarConversionPolicy diff --git a/src/Serilog/Policies/NullableScalarConversionPolicy-net40.cs b/src/Serilog/Policies/NullableScalarConversionPolicy-net40.cs deleted file mode 100644 index 5c1096cf1..000000000 --- a/src/Serilog/Policies/NullableScalarConversionPolicy-net40.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2013 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using Serilog.Core; -using Serilog.Events; - -namespace Serilog.Policies -{ - class NullableScalarConversionPolicy : IScalarConversionPolicy - { - public bool TryConvertToScalar(object value, ILogEventPropertyValueFactory propertyValueFactory, out ScalarValue result) - { - var type = value.GetType(); - if (!type.IsGenericType || type.GetGenericTypeDefinition() != typeof(Nullable<>)) - { - result = null; - return false; - } - - var dynamicValue = (dynamic)value; - var innerValue = dynamicValue.HasValue ? (object)dynamicValue.Value : null; - result = propertyValueFactory.CreatePropertyValue(innerValue) as ScalarValue; - - return result != null; - } - } -} diff --git a/src/Serilog/Policies/NullableScalarConversionPolicy.cs b/src/Serilog/Policies/NullableScalarConversionPolicy.cs index 0677b7f26..fce8be29e 100644 --- a/src/Serilog/Policies/NullableScalarConversionPolicy.cs +++ b/src/Serilog/Policies/NullableScalarConversionPolicy.cs @@ -23,13 +23,26 @@ class NullableScalarConversionPolicy : IScalarConversionPolicy public bool TryConvertToScalar(object value, ILogEventPropertyValueFactory propertyValueFactory, out ScalarValue result) { var type = value.GetType(); - if (!type.IsConstructedGenericType || type.GetGenericTypeDefinition() != typeof(Nullable<>)) + if (! +#if NET40 + type.IsGenericType +#else + type.IsConstructedGenericType +#endif + || type.GetGenericTypeDefinition() != typeof(Nullable<>)) { result = null; return false; } - var targetType = type.GenericTypeArguments[0]; + var targetType = +#if NET40 + type.GetGenericArguments() +#else + type.GenericTypeArguments +#endif + [0]; + var innerValue = Convert.ChangeType(value, targetType); result = propertyValueFactory.CreatePropertyValue(innerValue) as ScalarValue; return result != null; diff --git a/src/Serilog/Project.json b/src/Serilog/Project.json index 715675f21..2f2c7cda8 100644 --- a/src/Serilog/Project.json +++ b/src/Serilog/Project.json @@ -1,32 +1,81 @@ { - "version": "1.0.0-beta-*", - "dependencies": { }, - "code": "**/*.cs", - "exclude": "**/*net40.cs", - + "version": "2.0.0-beta-*", + "description": "Simple .NET logging with fully-structured events", + "authors": [ "Serilog Contributors" ], + "tags": [ "serilog", "logging", "semantic", "structured" ], + "projectUrl": "http://serilog.net", + "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0", "frameworks": { - "aspnetcore50": { + "net40": { + "compilationOptions": { + "define": [ "NET40" ], + "keyFile": "..\\assets\\Serilog.snk" + }, + "frameworkAssemblies": { + "System.Configuration": "", + "Microsoft.CSharp": "" + }, "dependencies": { - "Microsoft.CSharp": "4.0.0-beta-22231", - "System.Collections": "4.0.10-beta-22231", - "System.Collections.Concurrent": "4.0.0-beta-22231", - "System.Collections.NonGeneric": "4.0.0-beta-22231", - "System.Collections.Specialized": "4.0.0-beta-22231", - "System.Diagnostics.Debug": "4.0.10-beta-22231", - "System.Diagnostics.Tools": "4.0.0-beta-22231", - "System.Dynamic.Runtime": "4.0.0-beta-22231", - "System.Globalization": "4.0.10-beta-22231", - "System.Globalization.Calendars": "4.0.0-beta-22231", - "System.IO": "4.0.10-beta-22231", - "System.Linq": "4.0.0-beta-*", - "System.Net.Sockets": "4.0.0-beta-22231", - "System.ObjectModel": "4.0.0-beta-22231", - "System.Reflection": "4.0.10-beta-22231", - "System.Runtime": "4.0.20-beta-22231", - "System.Runtime.Extensions": "4.0.10-beta-22231", - "System.Threading": "4.0.0-beta-22231", - "System.Threading.Thread": "4.0.0-beta-22231" + "Microsoft.Bcl.Async": "1.0.168" + } + }, + "net45": { + "compilationOptions": { + "define": [ "NET45" ], + "keyFile": "..\\assets\\Serilog.snk" + }, + "frameworkAssemblies": { + "System.Configuration": "" + } + }, + "dnx451": { + "compilationOptions": { + "keyFile": "..\\assets\\Serilog.snk" + }, + "frameworkAssemblies": { + "System.Runtime": "", + "System.Configuration": "" + } + }, + ".NETPortable,Version=v4.5,Profile=Profile259": { + "compilationOptions": { + "define": [ "PROFILE259" ] + }, + "frameworkAssemblies": { + "System.Collections": "", + "System.Globalization": "", + "System.Runtime": "", + "System.Runtime.Extensions": "", + "System.Linq": "", + "System.IO": "", + "System.Reflection": "", + "System.Reflection.Extensions": "", + "System.Text.RegularExpressions": "", + "System.Diagnostics.Debug": "", + "System.Threading": "", + "System.Threading.Tasks": "", + "Microsoft.CSharp": "" + } + }, + "dnxcore50": { + "compilationOptions": { + "define": [ "DNXCORE50" ] + }, + "dependencies": { + "System.Collections": "4.0.10-beta-23019", + "System.Console": "4.0.0-beta-23019", + "System.Linq": "4.0.0-beta-23019", + "System.Text.RegularExpressions": "4.0.0-beta-23019", + "System.Threading": "4.0.10-beta-23019", + "System.Threading.Thread": "4.0.0-beta-23019", + "System.Threading.Timer": "4.0.0-beta-23019", + "Microsoft.CSharp": "4.0.0-beta-23019", + "System.Runtime": "4.0.20-beta-23019", + "System.Runtime.Extensions": "4.0.10-beta-23019", + "System.IO.FileSystem": "4.0.0-beta-23019", + "System.Diagnostics.TraceSource": "4.0.0-beta-23019", + "System.Diagnostics.Process": "4.0.0-beta-23019" } } } -} \ No newline at end of file +} diff --git a/src/Serilog/Serilog-aspnetcore50.kproj b/src/Serilog/Serilog-aspnetcore50.kproj deleted file mode 100644 index ae2d7d41f..000000000 --- a/src/Serilog/Serilog-aspnetcore50.kproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 3892f3ae-4e82-4134-b4ed-2b28e5b82451 - Library - - - - - - - 2.0 - - - True - - - \ No newline at end of file diff --git a/src/Serilog/Serilog-net40.csproj b/src/Serilog/Serilog-net40.csproj deleted file mode 100644 index 16aa68482..000000000 --- a/src/Serilog/Serilog-net40.csproj +++ /dev/null @@ -1,136 +0,0 @@ - - - - - Debug - AnyCPU - {0915DBD9-0F7C-4439-8D9E-74C3D579B219} - Library - Properties - Serilog - Serilog - v4.0 - 512 - - - true - full - false - bin40\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin40\Debug\Serilog.XML - - - pdbonly - true - bin40\Release\ - TRACE - prompt - 4 - true - bin40\Release\Serilog.XML - - - true - - - ..\..\assets\Serilog.snk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Properties\CommonAssemblyInfo.cs - - - - - - - - - - Serilog.snk - - - Designer - - - - - - - - - - \ No newline at end of file diff --git a/src/Serilog/Serilog.csproj b/src/Serilog/Serilog.csproj deleted file mode 100644 index f54c2b606..000000000 --- a/src/Serilog/Serilog.csproj +++ /dev/null @@ -1,137 +0,0 @@ - - - - - Debug - AnyCPU - {0915DBD9-0F7C-4439-8D9E-74C3D579B219} - Library - Properties - Serilog - Serilog - v4.5 - Profile259 - 512 - {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - bin\Debug\Serilog.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - bin\Release\Serilog.XML - - - true - - - ..\..\assets\Serilog.snk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Properties\CommonAssemblyInfo.cs - - - - - - - - Serilog.snk - - - Designer - - - - - \ No newline at end of file diff --git a/src/Serilog/Serilog.nuspec b/src/Serilog/Serilog.nuspec deleted file mode 100644 index 7e211670e..000000000 --- a/src/Serilog/Serilog.nuspec +++ /dev/null @@ -1,31 +0,0 @@ - - - - Serilog - $version$ - Serilog Contributors - Simple .NET logging with fully-structured events - en-US - http://serilog.net - http://www.apache.org/licenses/LICENSE-2.0 - http://serilog.net/images/serilog-nuget.png - serilog logging events semantic structured - - - - - - - - - - - - - - - - - - - diff --git a/src/Serilog/Serilog.xproj b/src/Serilog/Serilog.xproj new file mode 100644 index 000000000..00592785b --- /dev/null +++ b/src/Serilog/Serilog.xproj @@ -0,0 +1,24 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 803cd13a-d54b-4cec-a55f-e22ae3d93b3c + Serilog + ..\..\artifacts\obj\$(MSBuildProjectName) + ..\..\artifacts\bin\$(MSBuildProjectName)\ + + + 2.0 + + + True + + + False + + + \ No newline at end of file diff --git a/src/Serilog.FullNetFx/Settings/AppSettings/AppSettingsSettings.cs b/src/Serilog/Settings/AppSettings/AppSettingsSettings.cs similarity index 97% rename from src/Serilog.FullNetFx/Settings/AppSettings/AppSettingsSettings.cs rename to src/Serilog/Settings/AppSettings/AppSettingsSettings.cs index f5bce1fba..88e696717 100644 --- a/src/Serilog.FullNetFx/Settings/AppSettings/AppSettingsSettings.cs +++ b/src/Serilog/Settings/AppSettings/AppSettingsSettings.cs @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#if !PROFILE259 && !DNXCORE50 using System; using System.Configuration; @@ -43,3 +44,4 @@ public void Configure(LoggerConfiguration loggerConfiguration) } } } +#endif diff --git a/src/Serilog/Settings/KeyValuePairs/KeyValuePairSettings-net40.cs b/src/Serilog/Settings/KeyValuePairs/KeyValuePairSettings-net40.cs deleted file mode 100644 index cc1fc292e..000000000 --- a/src/Serilog/Settings/KeyValuePairs/KeyValuePairSettings-net40.cs +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright 2014 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Text.RegularExpressions; -using Serilog.Configuration; -using Serilog.Events; - -namespace Serilog.Settings.KeyValuePairs -{ - class KeyValuePairSettings : ILoggerSettings - { - const string UsingDirective = "using"; - const string WriteToDirective = "write-to"; - const string MinimumLevelDirective = "minimum-level"; - const string EnrichWithPropertyDirective = "enrich:with-property"; - - const string UsingDirectiveFullFormPrefix = "using:"; - const string EnrichWithPropertyDirectivePrefix = "enrich:with-property:"; - - const string WriteToDirectiveRegex = @"^write-to:(?[A-Za-z0-9]*)(\.(?[A-Za-z0-9]*)){0,1}$"; - - readonly string[] _supportedDirectives = - { - UsingDirective, - WriteToDirective, - MinimumLevelDirective, - EnrichWithPropertyDirective - }; - - readonly Dictionary _settings; - - public KeyValuePairSettings(IEnumerable> settings) - { - if (settings == null) throw new ArgumentNullException("settings"); - _settings = settings.ToDictionary(s => s.Key, s => s.Value); - } - - public void Configure(LoggerConfiguration loggerConfiguration) - { - if (loggerConfiguration == null) throw new ArgumentNullException("loggerConfiguration"); - - var directives = _settings.Keys - .Where(k => _supportedDirectives.Any(k.StartsWith)) - .ToDictionary(k => k, k => _settings[k]); - - string minimumLevelDirective; - LogEventLevel minimumLevel; - if (directives.TryGetValue(MinimumLevelDirective, out minimumLevelDirective) && - Enum.TryParse(minimumLevelDirective, out minimumLevel)) - { - loggerConfiguration.MinimumLevel.Is(minimumLevel); - } - - foreach (var enrichDirective in directives.Where(dir => - dir.Key.StartsWith(EnrichWithPropertyDirectivePrefix) && dir.Key.Length > EnrichWithPropertyDirectivePrefix.Length)) - { - var name = enrichDirective.Key.Substring(EnrichWithPropertyDirectivePrefix.Length); - loggerConfiguration.Enrich.WithProperty(name, enrichDirective.Value); - } - - var splitWriteTo = new Regex(WriteToDirectiveRegex); - - var sinkDirectives = (from wt in directives - where splitWriteTo.IsMatch(wt.Key) - let match = splitWriteTo.Match(wt.Key) - let call = new - { - Method = match.Groups["method"].Value, - Argument = match.Groups["argument"].Value, - wt.Value - } - group call by call.Method).ToList(); - - if (sinkDirectives.Any()) - { - var configurationAssemblies = LoadConfigurationAssemblies(directives); - var sinkConfigurationMethods = FindSinkConfigurationMethods(configurationAssemblies); - - foreach (var sinkDirective in sinkDirectives) - { - var target = sinkConfigurationMethods - .Where(m => m.Name == sinkDirective.Key && - m.GetParameters().Skip(1).All(p => p.HasDefaultValue() || sinkDirective.Any(s => s.Argument == p.Name))) - .OrderByDescending(m => m.GetParameters().Length) - .FirstOrDefault(); - - if (target != null) - { - var config = loggerConfiguration.WriteTo; - - var call = (from p in target.GetParameters().Skip(1) - let directive = sinkDirective.FirstOrDefault(s => s.Argument == p.Name) - select directive == null ? p.DefaultValue : ConvertToType(directive.Value, p.ParameterType)).ToList(); - - call.Insert(0, config); - - target.Invoke(null, call.ToArray()); - } - } - } - } - - internal static IEnumerable LoadConfigurationAssemblies(Dictionary directives) - { - var configurationAssemblies = new List { typeof(ILogger).GetTypeInfo().Assembly }; - - foreach (var usingDirective in directives.Where(d => d.Key.Equals(UsingDirective) || - d.Key.StartsWith(UsingDirectiveFullFormPrefix))) - { - configurationAssemblies.Add(Assembly.Load(new AssemblyName(usingDirective.Value))); - } - - return configurationAssemblies.Distinct(); - } - - internal static object ConvertToType(string value, Type toType) - { - var toTypeInfo = toType.GetTypeInfo(); - if (toTypeInfo.IsGenericType && toType.GetGenericTypeDefinition() == typeof(Nullable<>)) - { - if (string.IsNullOrEmpty(value)) - return null; - - // unwrap Nullable<> type since we're not handling null situations - toType = toTypeInfo.GenericTypeArguments[0]; - toTypeInfo = toType.GetTypeInfo(); - } - - if (toTypeInfo.IsEnum) - return Enum.Parse(toType, value); - - var extendedTypeConversions = new Dictionary> - { - { typeof(Uri), s => new Uri(s) }, - { typeof(TimeSpan), s => TimeSpan.Parse(s) } - }; - - var convertor = extendedTypeConversions - .Where(t => t.Key.GetTypeInfo().IsAssignableFrom(toTypeInfo)) - .Select(t => t.Value) - .FirstOrDefault(); - - return convertor == null ? Convert.ChangeType(value, toType) : convertor(value); - } - - internal static IEnumerable FindSinkConfigurationMethods(IEnumerable configurationAssemblies) - { - return configurationAssemblies - .SelectMany(a => a.GetExportedTypes().Select(t => t.GetTypeInfo()).Where(t => t.IsSealed && t.IsAbstract && !t.IsNested)) - .SelectMany(t => t.DeclaredMethods) - .Where(m => m.IsStatic && m.IsPublic && m.IsDefined(typeof(ExtensionAttribute), false)) - .Where(m => m.GetParameters()[0].ParameterType == typeof(LoggerSinkConfiguration)); - } - } -} diff --git a/src/Serilog/Settings/KeyValuePairs/KeyValuePairSettings.cs b/src/Serilog/Settings/KeyValuePairs/KeyValuePairSettings.cs index dc4e008d8..e54ac4631 100644 --- a/src/Serilog/Settings/KeyValuePairs/KeyValuePairSettings.cs +++ b/src/Serilog/Settings/KeyValuePairs/KeyValuePairSettings.cs @@ -21,6 +21,10 @@ using Serilog.Configuration; using Serilog.Events; +#if NET40 +using Serilog.Platform; +#endif + namespace Serilog.Settings.KeyValuePairs { class KeyValuePairSettings : ILoggerSettings @@ -96,7 +100,13 @@ where splitWriteTo.IsMatch(wt.Key) { var target = sinkConfigurationMethods .Where(m => m.Name == sinkDirective.Key && - m.GetParameters().Skip(1).All(p => p.HasDefaultValue || sinkDirective.Any(s => s.Argument == p.Name))) + m.GetParameters().Skip(1).All(p => +#if NET40 + (p.Attributes & ParameterAttributes.HasDefault) != ParameterAttributes.None +#else + p.HasDefaultValue +#endif + || sinkDirective.Any(s => s.Argument == p.Name))) .OrderByDescending(m => m.GetParameters().Length) .FirstOrDefault(); @@ -156,13 +166,23 @@ internal static object ConvertToType(string value, Type toType) .Select(t => t.Value) .FirstOrDefault(); +#if !PROFILE259 + return convertor == null ? Convert.ChangeType(value, toType) : convertor(value); +#else return convertor == null ? Convert.ChangeType(value, toType) : convertor(value); +#endif } internal static IEnumerable FindSinkConfigurationMethods(IEnumerable configurationAssemblies) { return configurationAssemblies - .SelectMany(a => a.ExportedTypes.Select(t => t.GetTypeInfo()).Where(t => t.IsSealed && t.IsAbstract && !t.IsNested)) + .SelectMany(a => a. +#if NET40 + GetExportedTypes() +#else + ExportedTypes +#endif + .Select(t => t.GetTypeInfo()).Where(t => t.IsSealed && t.IsAbstract && !t.IsNested)) .SelectMany(t => t.DeclaredMethods) .Where(m => m.IsStatic && m.IsPublic && m.IsDefined(typeof(ExtensionAttribute), false)) .Where(m => m.GetParameters()[0].ParameterType == typeof(LoggerSinkConfiguration)); diff --git a/src/Serilog/Settings/KeyValuePairs/ParameterInfoExtensions-40.cs b/src/Serilog/Settings/KeyValuePairs/ParameterInfoExtensions-40.cs deleted file mode 100644 index d39a31fd0..000000000 --- a/src/Serilog/Settings/KeyValuePairs/ParameterInfoExtensions-40.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Reflection; - -namespace Serilog.Settings.KeyValuePairs -{ - /// - /// Backport of .Net 4.5 features - /// - static class ParameterInfoExtensions - { - public static bool HasDefaultValue(this ParameterInfo parameterInfo) - { - return (parameterInfo.Attributes & ParameterAttributes.HasDefault) != ParameterAttributes.None; - } - } -} \ No newline at end of file diff --git a/src/Serilog/Settings/KeyValuePairs/TypeExtensions-40.cs b/src/Serilog/Settings/KeyValuePairs/TypeExtensions-40.cs deleted file mode 100644 index 43004ff56..000000000 --- a/src/Serilog/Settings/KeyValuePairs/TypeExtensions-40.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; - -namespace Serilog.Settings.KeyValuePairs -{ - /// - /// Backport of .Net 4.5 TypeInfo concept - /// - static class TypeExtensions - { - internal static TypeInfo GetTypeInfo(this Type type) - { - return new TypeInfo(type); - } - - internal class TypeInfo - { - readonly Type type; - - public TypeInfo(Type type) - { - this.type = type; - } - - public Type Type - { - get { return type; } - } - - public bool IsGenericType - { - get { return type.IsGenericType; } - } - - public Type[] GenericTypeArguments - { - get { return type.GetGenericArguments(); } - } - - public bool IsEnum - { - get { return type.IsEnum; } - } - - public Assembly Assembly - { - get { return type.Assembly; } - } - - public bool IsSealed - { - get { return type.IsSealed; } - } - - public bool IsAbstract - { - get { return type.IsAbstract; } - } - - public bool IsNested - { - get { return type.IsNested; } - } - - public IEnumerable DeclaredMethods - { - get { return type.GetMethods(); } - } - - public bool IsAssignableFrom(TypeInfo targetType) - { - return type.IsAssignableFrom(targetType.Type); - } - } - } -} \ No newline at end of file diff --git a/src/Serilog.FullNetFx/Sinks/DiagnosticTrace/DiagnosticTraceSink.cs b/src/Serilog/Sinks/DiagnosticTrace/DiagnosticTraceSink.cs similarity index 98% rename from src/Serilog.FullNetFx/Sinks/DiagnosticTrace/DiagnosticTraceSink.cs rename to src/Serilog/Sinks/DiagnosticTrace/DiagnosticTraceSink.cs index 6f8e91d81..6ae10929a 100644 --- a/src/Serilog.FullNetFx/Sinks/DiagnosticTrace/DiagnosticTraceSink.cs +++ b/src/Serilog/Sinks/DiagnosticTrace/DiagnosticTraceSink.cs @@ -19,6 +19,7 @@ using Serilog.Events; using Serilog.Formatting; +#if !PROFILE259 namespace Serilog.Sinks.DiagnosticTrace { class DiagnosticTraceSink : ILogEventSink @@ -50,3 +51,4 @@ public void Emit(LogEvent logEvent) } } } +#endif diff --git a/src/Serilog.FullNetFx/Sinks/IOFile/CharacterCountLimitedTextWriter.cs b/src/Serilog/Sinks/IOFile/CharacterCountLimitedTextWriter.cs similarity index 99% rename from src/Serilog.FullNetFx/Sinks/IOFile/CharacterCountLimitedTextWriter.cs rename to src/Serilog/Sinks/IOFile/CharacterCountLimitedTextWriter.cs index 1f58ae9d9..e6b3158f1 100644 --- a/src/Serilog.FullNetFx/Sinks/IOFile/CharacterCountLimitedTextWriter.cs +++ b/src/Serilog/Sinks/IOFile/CharacterCountLimitedTextWriter.cs @@ -17,6 +17,7 @@ using System.Text; using System.Threading; +#if !PROFILE259 namespace Serilog.Sinks.IOFile { sealed class CharacterCountLimitedTextWriter : TextWriter @@ -80,4 +81,5 @@ public override void Flush() _outputWriter.Flush(); } } -} \ No newline at end of file +} +#endif diff --git a/src/Serilog.FullNetFx/Sinks/IOFile/FileSink.cs b/src/Serilog/Sinks/IOFile/FileSink.cs similarity index 99% rename from src/Serilog.FullNetFx/Sinks/IOFile/FileSink.cs rename to src/Serilog/Sinks/IOFile/FileSink.cs index 91a2c63a2..0e3a9176c 100644 --- a/src/Serilog.FullNetFx/Sinks/IOFile/FileSink.cs +++ b/src/Serilog/Sinks/IOFile/FileSink.cs @@ -20,6 +20,7 @@ using Serilog.Events; using Serilog.Formatting; +#if !PROFILE259 namespace Serilog.Sinks.IOFile { /// @@ -105,3 +106,4 @@ public void Dispose() } } } +#endif diff --git a/src/Serilog.FullNetFx/Sinks/IOFile/NullSink.cs b/src/Serilog/Sinks/IOFile/NullSink.cs similarity index 100% rename from src/Serilog.FullNetFx/Sinks/IOFile/NullSink.cs rename to src/Serilog/Sinks/IOFile/NullSink.cs diff --git a/src/Serilog/Sinks/Observable/ObservableSink-net40.cs b/src/Serilog/Sinks/Observable/ObservableSink-net40.cs deleted file mode 100644 index acd5e2005..000000000 --- a/src/Serilog/Sinks/Observable/ObservableSink-net40.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2013 Serilog Contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using Serilog.Core; -using Serilog.Events; - -namespace Serilog.Sinks.Observable -{ - sealed class ObservableSink : IObservable, ILogEventSink, IDisposable - { - readonly object _syncRoot = new object(); - IList> _observers = new List>(); - bool _disposed; - - sealed class Unsubscriber : IDisposable - { - readonly ObservableSink _sink; - readonly IObserver _observer; - - public Unsubscriber(ObservableSink sink, IObserver observer) - { - if (sink == null) throw new ArgumentNullException("sink"); - if (observer == null) throw new ArgumentNullException("observer"); - _sink = sink; - _observer = observer; - } - - public void Dispose() - { - _sink.Unsubscribe(_observer); - } - } - - public IDisposable Subscribe(IObserver observer) - { - if (observer == null) throw new ArgumentNullException("observer"); - - lock (_syncRoot) - { - // Makes the assumption that list iteration is not - // mutating - correct but not guaranteed by the BCL. - var newObservers = _observers.ToList(); - newObservers.Add(observer); - Interlocked.Exchange(ref _observers, newObservers); - } - - return new Unsubscriber(this, observer); - } - - void Unsubscribe(IObserver observer) - { - if (observer == null) throw new ArgumentNullException("observer"); - - lock (_syncRoot) - _observers.Remove(observer); - } - - public void Emit(LogEvent logEvent) - { - if (logEvent == null) throw new ArgumentNullException("logEvent"); - - Thread.MemoryBarrier(); - - IList exceptions = null; - - foreach (var observer in _observers) - { - try - { - observer.OnNext(logEvent); - } - catch (Exception ex) - { - if (exceptions == null) - exceptions = new List(); - exceptions.Add(ex); - } - } - - if (exceptions != null) - throw new AggregateException("At least one observer failed to accept the event", exceptions); - } - - public void Dispose() - { - lock (_syncRoot) - { - if (_disposed) return; - - _disposed = true; - foreach (var observer in _observers) - { - observer.OnCompleted(); - } - } - } - } -} diff --git a/src/Serilog/Sinks/Observable/ObservableSink.cs b/src/Serilog/Sinks/Observable/ObservableSink.cs index cfc34ddad..dfd0c5b45 100644 --- a/src/Serilog/Sinks/Observable/ObservableSink.cs +++ b/src/Serilog/Sinks/Observable/ObservableSink.cs @@ -74,7 +74,11 @@ public void Emit(LogEvent logEvent) { if (logEvent == null) throw new ArgumentNullException("logEvent"); +#if NET40 + Thread.MemoryBarrier(); +#else Interlocked.MemoryBarrier(); +#endif IList exceptions = null; diff --git a/src/Serilog.FullNetFx/Sinks/PeriodicBatching/BatchedConnectionStatus.cs b/src/Serilog/Sinks/PeriodicBatching/BatchedConnectionStatus.cs similarity index 99% rename from src/Serilog.FullNetFx/Sinks/PeriodicBatching/BatchedConnectionStatus.cs rename to src/Serilog/Sinks/PeriodicBatching/BatchedConnectionStatus.cs index 19301a410..56a5994ca 100644 --- a/src/Serilog.FullNetFx/Sinks/PeriodicBatching/BatchedConnectionStatus.cs +++ b/src/Serilog/Sinks/PeriodicBatching/BatchedConnectionStatus.cs @@ -14,6 +14,7 @@ using System; +#if !PROFILE259 && !DNXCORE50 namespace Serilog.Sinks.PeriodicBatching { /// @@ -104,4 +105,5 @@ public bool ShouldDropQueue } } } -} \ No newline at end of file +} +#endif diff --git a/src/Serilog.FullNetFx/Sinks/PeriodicBatching/PeriodicBatchingSink.cs b/src/Serilog/Sinks/PeriodicBatching/PeriodicBatchingSink.cs similarity index 93% rename from src/Serilog.FullNetFx/Sinks/PeriodicBatching/PeriodicBatchingSink.cs rename to src/Serilog/Sinks/PeriodicBatching/PeriodicBatchingSink.cs index 397fc63f4..d4e7e496f 100644 --- a/src/Serilog.FullNetFx/Sinks/PeriodicBatching/PeriodicBatchingSink.cs +++ b/src/Serilog/Sinks/PeriodicBatching/PeriodicBatchingSink.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if !ASPNETCORE50 +#if !PROFILE259 && !DNXCORE50 using System; using System.Collections.Concurrent; using System.Collections.Generic; @@ -55,7 +55,7 @@ protected PeriodicBatchingSink(int batchSizeLimit, TimeSpan period) { _batchSizeLimit = batchSizeLimit; _queue = new ConcurrentQueue(); - _timer = new Timer(s => OnTick()); + _timer = new Timer(s => OnTick(), null, -1, -1); _status = new BatchedConnectionStatus(period); AppDomain.CurrentDomain.DomainUnload += OnAppDomainUnloading; @@ -183,7 +183,13 @@ void OnTick() lock (_stateLock) { if (!_unloading) - _timer.Change(_status.NextInterval, Timeout.InfiniteTimeSpan); + _timer.Change(_status.NextInterval, +#if NET40 + TimeSpan.FromMilliseconds(-1) +#else + Timeout.InfiniteTimeSpan +#endif + ); } } } @@ -211,7 +217,13 @@ public void Emit(LogEvent logEvent) // Special handling to try to get the first event across as quickly // as possible to show we're alive! _started = true; - _timer.Change(TimeSpan.Zero, Timeout.InfiniteTimeSpan); + _timer.Change(TimeSpan.Zero, +#if NET40 + TimeSpan.FromMilliseconds(-1) +#else + Timeout.InfiniteTimeSpan +#endif + ); } } @@ -230,4 +242,4 @@ protected virtual bool CanInclude(LogEvent evt) } } } -#endif \ No newline at end of file +#endif diff --git a/src/Serilog.FullNetFx/Sinks/RollingFile/Clock.cs b/src/Serilog/Sinks/RollingFile/Clock.cs similarity index 100% rename from src/Serilog.FullNetFx/Sinks/RollingFile/Clock.cs rename to src/Serilog/Sinks/RollingFile/Clock.cs diff --git a/src/Serilog.FullNetFx/Sinks/RollingFile/RollingFileSink.cs b/src/Serilog/Sinks/RollingFile/RollingFileSink.cs similarity index 99% rename from src/Serilog.FullNetFx/Sinks/RollingFile/RollingFileSink.cs rename to src/Serilog/Sinks/RollingFile/RollingFileSink.cs index 38c7adcfd..b21a1f384 100644 --- a/src/Serilog.FullNetFx/Sinks/RollingFile/RollingFileSink.cs +++ b/src/Serilog/Sinks/RollingFile/RollingFileSink.cs @@ -23,6 +23,7 @@ using Serilog.Formatting; using Serilog.Sinks.IOFile; +#if !PROFILE259 namespace Serilog.Sinks.RollingFile { /// @@ -221,3 +222,4 @@ void CloseFile() } } } +#endif \ No newline at end of file diff --git a/src/Serilog.FullNetFx/Sinks/RollingFile/RollingLogFile.cs b/src/Serilog/Sinks/RollingFile/RollingLogFile.cs similarity index 100% rename from src/Serilog.FullNetFx/Sinks/RollingFile/RollingLogFile.cs rename to src/Serilog/Sinks/RollingFile/RollingLogFile.cs diff --git a/src/Serilog.FullNetFx/Sinks/RollingFile/TemplatedPathRoller.cs b/src/Serilog/Sinks/RollingFile/TemplatedPathRoller.cs similarity index 99% rename from src/Serilog.FullNetFx/Sinks/RollingFile/TemplatedPathRoller.cs rename to src/Serilog/Sinks/RollingFile/TemplatedPathRoller.cs index 2af9296f1..fac1483f9 100644 --- a/src/Serilog.FullNetFx/Sinks/RollingFile/TemplatedPathRoller.cs +++ b/src/Serilog/Sinks/RollingFile/TemplatedPathRoller.cs @@ -18,6 +18,7 @@ using System.IO; using System.Text.RegularExpressions; +#if !PROFILE259 namespace Serilog.Sinks.RollingFile { // Rolls files based on the current date, using a path @@ -46,10 +47,10 @@ public TemplatedPathRoller(string pathTemplate) var directory = Path.GetDirectoryName(pathTemplate); if (string.IsNullOrEmpty(directory)) { -#if ASPNETCORE50 - directory = Directory.GetCurrentDirectory(); -#else +#if !DNXCORE50 directory = Environment.CurrentDirectory; +#else + directory = Directory.GetCurrentDirectory(); #endif } @@ -126,3 +127,4 @@ public IEnumerable SelectMatches(IEnumerable filenames) } } } +#endif diff --git a/src/Serilog.FullNetFx/Sinks/SystemConsole/ColoredConsoleSink.cs b/src/Serilog/Sinks/SystemConsole/ColoredConsoleSink.cs similarity index 94% rename from src/Serilog.FullNetFx/Sinks/SystemConsole/ColoredConsoleSink.cs rename to src/Serilog/Sinks/SystemConsole/ColoredConsoleSink.cs index d81a428fc..db32f857d 100644 --- a/src/Serilog.FullNetFx/Sinks/SystemConsole/ColoredConsoleSink.cs +++ b/src/Serilog/Sinks/SystemConsole/ColoredConsoleSink.cs @@ -20,6 +20,13 @@ using Serilog.Formatting.Display; using Serilog.Parsing; +#if NET40 +using IPropertyDictionary = System.Collections.Generic.IDictionary; +#else +using IPropertyDictionary = System.Collections.Generic.IReadOnlyDictionary; +#endif + +#if !PROFILE259 && !DNXCORE50 namespace Serilog.Sinks.SystemConsole { class ColoredConsoleSink : ILogEventSink @@ -102,7 +109,7 @@ public void Emit(LogEvent logEvent) } } - void RenderExceptionToken(Palette palette, MessageTemplateToken outputToken, IReadOnlyDictionary outputProperties, TextWriter output) + void RenderExceptionToken(Palette palette, MessageTemplateToken outputToken, IPropertyDictionary outputProperties, TextWriter output) { var sw = new StringWriter(); outputToken.Render(outputProperties, sw, _formatProvider); @@ -136,7 +143,7 @@ void RenderMessageToken(LogEvent logEvent, Palette palette, TextWriter output) } } - void RenderOutputToken(Palette palette, MessageTemplateToken outputToken, IReadOnlyDictionary outputProperties, TextWriter output) + void RenderOutputToken(Palette palette, MessageTemplateToken outputToken, IPropertyDictionary outputProperties, TextWriter output) { SetBaseColors(palette); outputToken.Render(outputProperties, output, _formatProvider); @@ -168,3 +175,4 @@ static void SetColors(ConsoleColor background, ConsoleColor foreground) } } } +#endif diff --git a/src/Serilog.FullNetFx/Sinks/SystemConsole/ConsoleSink.cs b/src/Serilog/Sinks/SystemConsole/ConsoleSink.cs similarity index 98% rename from src/Serilog.FullNetFx/Sinks/SystemConsole/ConsoleSink.cs rename to src/Serilog/Sinks/SystemConsole/ConsoleSink.cs index 7b93b7f37..e214c1303 100644 --- a/src/Serilog.FullNetFx/Sinks/SystemConsole/ConsoleSink.cs +++ b/src/Serilog/Sinks/SystemConsole/ConsoleSink.cs @@ -18,6 +18,7 @@ using Serilog.Events; using Serilog.Formatting; +#if !PROFILE259 namespace Serilog.Sinks.SystemConsole { class ConsoleSink : ILogEventSink @@ -39,3 +40,4 @@ public void Emit(LogEvent logEvent) } } } +#endif diff --git a/src/Serilog/project.lock.json b/src/Serilog/project.lock.json new file mode 100644 index 000000000..6dfdd952c --- /dev/null +++ b/src/Serilog/project.lock.json @@ -0,0 +1,1268 @@ +{ + "locked": false, + "version": -9996, + "targets": { + ".NETFramework,Version=v4.0": { + "Microsoft.Bcl/1.1.8": { + "dependencies": { + "Microsoft.Bcl.Build": "1.0.14" + }, + "compile": { + "lib/net40/System.IO.dll": {}, + "lib/net40/System.Runtime.dll": {}, + "lib/net40/System.Threading.Tasks.dll": {} + }, + "runtime": { + "lib/net40/System.IO.dll": {}, + "lib/net40/System.Runtime.dll": {}, + "lib/net40/System.Threading.Tasks.dll": {} + } + }, + "Microsoft.Bcl.Async/1.0.168": { + "dependencies": { + "Microsoft.Bcl": "1.1.8" + }, + "frameworkAssemblies": [ + "System.Net" + ], + "compile": { + "lib/net40/Microsoft.Threading.Tasks.dll": {}, + "lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.dll": {}, + "lib/net40/Microsoft.Threading.Tasks.Extensions.dll": {} + }, + "runtime": { + "lib/net40/Microsoft.Threading.Tasks.dll": {}, + "lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.dll": {}, + "lib/net40/Microsoft.Threading.Tasks.Extensions.dll": {} + } + }, + "Microsoft.Bcl.Build/1.0.14": {} + }, + ".NETFramework,Version=v4.5": {}, + "DNX,Version=v4.5.1": {}, + ".NETPortable,Version=v4.5,Profile=Profile259": {}, + "DNXCore,Version=v5.0": { + "Microsoft.CSharp/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019", + "System.Dynamic.Runtime": "4.0.0-beta-23019", + "System.Linq.Expressions": "4.0.0-beta-23019", + "System.Runtime.InteropServices": "4.0.20-beta-23019", + "System.Resources.ResourceManager": "4.0.0-beta-23019", + "System.Linq": "4.0.0-beta-23019", + "System.Reflection.TypeExtensions": "4.0.0-beta-23019", + "System.Reflection.Primitives": "4.0.0-beta-23019", + "System.Reflection.Extensions": "4.0.0-beta-23019", + "System.Threading": "4.0.0-beta-23019", + "System.Collections": "4.0.10-beta-23019", + "System.Diagnostics.Debug": "4.0.10-beta-23019", + "System.Reflection": "4.0.10-beta-23019", + "System.Globalization": "4.0.10-beta-23019", + "System.Runtime.Extensions": "4.0.10-beta-23019", + "System.ObjectModel": "4.0.10-beta-23019" + }, + "compile": { + "ref/dotnet/Microsoft.CSharp.dll": {} + }, + "runtime": { + "lib/dotnet/Microsoft.CSharp.dll": {} + } + }, + "Microsoft.Win32.Primitives/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019", + "System.Runtime.InteropServices": "4.0.20-beta-23019" + }, + "compile": { + "ref/dotnet/Microsoft.Win32.Primitives.dll": {} + }, + "runtime": { + "lib/dotnet/Microsoft.Win32.Primitives.dll": {} + } + }, + "Microsoft.Win32.Registry/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019", + "System.Runtime.InteropServices": "4.0.20-beta-23019", + "System.Resources.ResourceManager": "4.0.0-beta-23019", + "System.Runtime.Handles": "4.0.0-beta-23019", + "System.Runtime.Extensions": "4.0.10-beta-23019", + "System.Collections": "4.0.10-beta-23019", + "System.Globalization": "4.0.10-beta-23019" + }, + "compile": { + "ref/dotnet/Microsoft.Win32.Registry.dll": {} + }, + "runtime": { + "lib/DNXCore50/Microsoft.Win32.Registry.dll": {} + } + }, + "System.Collections/4.0.10-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019" + }, + "compile": { + "ref/dotnet/System.Collections.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Collections.dll": {} + } + }, + "System.Console/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019", + "System.Runtime.InteropServices": "4.0.20-beta-23019", + "System.Resources.ResourceManager": "4.0.0-beta-23019", + "System.IO.FileSystem.Primitives": "4.0.0-beta-23019", + "System.IO": "4.0.10-beta-23019", + "System.Threading.Tasks": "4.0.10-beta-23019", + "System.Text.Encoding": "4.0.10-beta-23019", + "System.Threading": "4.0.10-beta-23019", + "System.Text.Encoding.Extensions": "4.0.10-beta-23019" + }, + "compile": { + "ref/dotnet/System.Console.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Console.dll": {} + } + }, + "System.Diagnostics.Debug/4.0.10-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Diagnostics.Debug.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Diagnostics.Debug.dll": {} + } + }, + "System.Diagnostics.Process/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019", + "System.Runtime.InteropServices": "4.0.20-beta-23019", + "System.Resources.ResourceManager": "4.0.0-beta-23019", + "System.Runtime.Handles": "4.0.0-beta-23019", + "System.IO.FileSystem": "4.0.0-beta-23019", + "System.Security.SecureString": "4.0.0-beta-23019", + "Microsoft.Win32.Registry": "4.0.0-beta-23019", + "Microsoft.Win32.Primitives": "4.0.0-beta-23019", + "System.IO.FileSystem.Primitives": "4.0.0-beta-23019", + "System.Threading.Thread": "4.0.0-beta-23019", + "System.Text.Encoding": "4.0.10-beta-23019", + "System.IO": "4.0.10-beta-23019", + "System.Threading": "4.0.10-beta-23019", + "System.Collections": "4.0.10-beta-23019", + "System.Threading.Tasks": "4.0.10-beta-23019", + "System.Threading.ThreadPool": "4.0.10-beta-23019", + "System.Globalization": "4.0.10-beta-23019", + "System.Text.Encoding.Extensions": "4.0.10-beta-23019", + "System.Runtime.Extensions": "4.0.10-beta-23019" + }, + "compile": { + "ref/dotnet/System.Diagnostics.Process.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Diagnostics.Process.dll": {} + } + }, + "System.Diagnostics.TraceSource/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019", + "System.Resources.ResourceManager": "4.0.0-beta-23019", + "System.Collections": "4.0.10-beta-23019", + "System.Runtime.Extensions": "4.0.10-beta-23019", + "System.Diagnostics.Debug": "4.0.10-beta-23019", + "System.Threading": "4.0.10-beta-23019", + "System.Globalization": "4.0.10-beta-23019" + }, + "compile": { + "ref/dotnet/System.Diagnostics.TraceSource.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Diagnostics.TraceSource.dll": {} + } + }, + "System.Dynamic.Runtime/4.0.0-beta-23019": { + "dependencies": { + "System.Linq.Expressions": "4.0.0-beta-23019", + "System.ObjectModel": "4.0.0-beta-23019", + "System.Reflection": "4.0.0-beta-23019", + "System.Runtime": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Dynamic.Runtime.dll": {} + } + }, + "System.Globalization/4.0.10-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Globalization.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Globalization.dll": {} + } + }, + "System.IO/4.0.10-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019", + "System.Text.Encoding": "4.0.0-beta-23019", + "System.Threading.Tasks": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.IO.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.IO.dll": {} + } + }, + "System.IO.FileSystem/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019", + "System.Runtime.InteropServices": "4.0.20-beta-23019", + "System.Resources.ResourceManager": "4.0.0-beta-23019", + "System.IO.FileSystem.Primitives": "4.0.0-beta-23019", + "System.Runtime.Handles": "4.0.0-beta-23019", + "System.Threading.Overlapped": "4.0.0-beta-23019", + "System.Text.Encoding": "4.0.10-beta-23019", + "System.IO": "4.0.10-beta-23019", + "System.Collections": "4.0.10-beta-23019", + "System.Threading.Tasks": "4.0.10-beta-23019", + "System.Runtime.Extensions": "4.0.10-beta-23019", + "System.Text.Encoding.Extensions": "4.0.10-beta-23019", + "System.Threading": "4.0.10-beta-23019" + }, + "compile": { + "ref/dotnet/System.IO.FileSystem.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.IO.FileSystem.dll": {} + } + }, + "System.IO.FileSystem.Primitives/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019" + }, + "compile": { + "ref/dotnet/System.IO.FileSystem.Primitives.dll": {} + }, + "runtime": { + "lib/dotnet/System.IO.FileSystem.Primitives.dll": {} + } + }, + "System.Linq/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019", + "System.Collections": "4.0.10-beta-23019", + "System.Resources.ResourceManager": "4.0.0-beta-23019", + "System.Diagnostics.Debug": "4.0.10-beta-23019", + "System.Runtime.Extensions": "4.0.10-beta-23019" + }, + "compile": { + "ref/dotnet/System.Linq.dll": {} + }, + "runtime": { + "lib/dotnet/System.Linq.dll": {} + } + }, + "System.Linq.Expressions/4.0.0-beta-23019": { + "dependencies": { + "System.Reflection": "4.0.0-beta-23019", + "System.Runtime": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Linq.Expressions.dll": {} + } + }, + "System.ObjectModel/4.0.10-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019", + "System.Resources.ResourceManager": "4.0.0-beta-23019", + "System.Diagnostics.Debug": "4.0.10-beta-23019", + "System.Collections": "4.0.10-beta-23019", + "System.Threading": "4.0.10-beta-23019" + }, + "compile": { + "ref/dotnet/System.ObjectModel.dll": {} + }, + "runtime": { + "lib/dotnet/System.ObjectModel.dll": {} + } + }, + "System.Private.Uri/4.0.0-beta-23019": { + "runtime": { + "lib/DNXCore50/System.Private.Uri.dll": {} + } + }, + "System.Reflection/4.0.10-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019", + "System.IO": "4.0.0-beta-23019", + "System.Reflection.Primitives": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Reflection.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Reflection.dll": {} + } + }, + "System.Reflection.Extensions/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019", + "System.Reflection": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Reflection.Extensions.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Reflection.Extensions.dll": {} + } + }, + "System.Reflection.Primitives/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Reflection.Primitives.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Reflection.Primitives.dll": {} + } + }, + "System.Reflection.TypeExtensions/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019", + "System.Reflection": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Reflection.TypeExtensions.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Reflection.TypeExtensions.dll": {} + } + }, + "System.Resources.ResourceManager/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019", + "System.Reflection": "4.0.0-beta-23019", + "System.Globalization": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Resources.ResourceManager.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Resources.ResourceManager.dll": {} + } + }, + "System.Runtime/4.0.20-beta-23019": { + "dependencies": { + "System.Private.Uri": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Runtime.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.dll": {} + } + }, + "System.Runtime.Extensions/4.0.10-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019" + }, + "compile": { + "ref/dotnet/System.Runtime.Extensions.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.Extensions.dll": {} + } + }, + "System.Runtime.Handles/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Runtime.Handles.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.Handles.dll": {} + } + }, + "System.Runtime.InteropServices/4.0.20-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019", + "System.Reflection": "4.0.0-beta-23019", + "System.Reflection.Primitives": "4.0.0-beta-23019", + "System.Runtime.Handles": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Runtime.InteropServices.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.InteropServices.dll": {} + } + }, + "System.Security.Cryptography.Encryption/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019", + "System.Resources.ResourceManager": "4.0.0-beta-23019", + "System.IO": "4.0.0-beta-23019", + "System.Threading.Tasks": "4.0.0-beta-23019", + "System.Globalization": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Security.Cryptography.Encryption.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Security.Cryptography.Encryption.dll": {} + } + }, + "System.Security.SecureString/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.20-beta-23019", + "System.Runtime.InteropServices": "4.0.20-beta-23019", + "System.Resources.ResourceManager": "4.0.0-beta-23019", + "System.Runtime.Handles": "4.0.0-beta-23019", + "System.Security.Cryptography.Encryption": "4.0.0-beta-23019", + "System.Threading": "4.0.10-beta-23019" + }, + "compile": { + "ref/dotnet/System.Security.SecureString.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Security.SecureString.dll": {} + } + }, + "System.Text.Encoding/4.0.10-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Text.Encoding.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Text.Encoding.dll": {} + } + }, + "System.Text.Encoding.Extensions/4.0.10-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019", + "System.Text.Encoding": "4.0.10-beta-23019" + }, + "compile": { + "ref/dotnet/System.Text.Encoding.Extensions.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Text.Encoding.Extensions.dll": {} + } + }, + "System.Text.RegularExpressions/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Text.RegularExpressions.dll": {} + } + }, + "System.Threading/4.0.10-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019", + "System.Threading.Tasks": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Threading.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Threading.dll": {} + } + }, + "System.Threading.Overlapped/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019", + "System.Runtime.Handles": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Threading.Overlapped.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Threading.Overlapped.dll": {} + } + }, + "System.Threading.Tasks/4.0.10-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Threading.Tasks.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Threading.Tasks.dll": {} + } + }, + "System.Threading.Thread/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Threading.Thread.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Threading.Thread.dll": {} + } + }, + "System.Threading.ThreadPool/4.0.10-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019", + "System.Runtime.InteropServices": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Threading.ThreadPool.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Threading.ThreadPool.dll": {} + } + }, + "System.Threading.Timer/4.0.0-beta-23019": { + "dependencies": { + "System.Runtime": "4.0.0-beta-23019" + }, + "compile": { + "ref/dotnet/System.Threading.Timer.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Threading.Timer.dll": {} + } + } + } + }, + "libraries": { + "Microsoft.Bcl/1.1.8": { + "sha512": "gM+PUzd8ONxJpcPJeNppCJPklDhDuPUMVQkxvK4fe0rd9WyqBNPh4+UFx3Uv8zuG4C1Gapu1c25sfotE7TQtig==", + "files": [ + "License-Stable.rtf", + "Microsoft.Bcl.1.1.8.nupkg", + "Microsoft.Bcl.1.1.8.nupkg.sha512", + "Microsoft.Bcl.nuspec", + "content/net45/_._", + "content/portable-net45+win8+wp8+wpa81/_._", + "content/portable-net45+win8+wpa81/_._", + "content/portable-net451+win81/_._", + "content/portable-net451+win81+wpa81/_._", + "content/portable-win81+wp81+wpa81/_._", + "content/sl4/_._", + "content/sl5/_._", + "content/win8/_._", + "content/wp8/_._", + "content/wpa81/_._", + "lib/net40/ensureRedirect.xml", + "lib/net40/System.IO.dll", + "lib/net40/System.IO.xml", + "lib/net40/System.Runtime.dll", + "lib/net40/System.Runtime.xml", + "lib/net40/System.Threading.Tasks.dll", + "lib/net40/System.Threading.Tasks.xml", + "lib/net45/_._", + "lib/portable-net40+sl4+win8/ensureRedirect.xml", + "lib/portable-net40+sl4+win8/System.IO.dll", + "lib/portable-net40+sl4+win8/System.IO.xml", + "lib/portable-net40+sl4+win8/System.Runtime.dll", + "lib/portable-net40+sl4+win8/System.Runtime.xml", + "lib/portable-net40+sl4+win8/System.Threading.Tasks.dll", + "lib/portable-net40+sl4+win8/System.Threading.Tasks.xml", + "lib/portable-net40+sl4+win8+wp71+wpa81/ensureRedirect.xml", + "lib/portable-net40+sl4+win8+wp71+wpa81/System.IO.dll", + "lib/portable-net40+sl4+win8+wp71+wpa81/System.IO.xml", + "lib/portable-net40+sl4+win8+wp71+wpa81/System.Runtime.dll", + "lib/portable-net40+sl4+win8+wp71+wpa81/System.Runtime.xml", + "lib/portable-net40+sl4+win8+wp71+wpa81/System.Threading.Tasks.dll", + "lib/portable-net40+sl4+win8+wp71+wpa81/System.Threading.Tasks.xml", + "lib/portable-net40+sl4+win8+wp8+wpa81/ensureRedirect.xml", + "lib/portable-net40+sl4+win8+wp8+wpa81/System.IO.dll", + "lib/portable-net40+sl4+win8+wp8+wpa81/System.IO.xml", + "lib/portable-net40+sl4+win8+wp8+wpa81/System.Runtime.dll", + "lib/portable-net40+sl4+win8+wp8+wpa81/System.Runtime.xml", + "lib/portable-net40+sl4+win8+wp8+wpa81/System.Threading.Tasks.dll", + "lib/portable-net40+sl4+win8+wp8+wpa81/System.Threading.Tasks.xml", + "lib/portable-net40+sl5+win8+wp8+wpa81/ensureRedirect.xml", + "lib/portable-net40+sl5+win8+wp8+wpa81/System.IO.dll", + "lib/portable-net40+sl5+win8+wp8+wpa81/System.IO.xml", + "lib/portable-net40+sl5+win8+wp8+wpa81/System.Runtime.dll", + "lib/portable-net40+sl5+win8+wp8+wpa81/System.Runtime.xml", + "lib/portable-net40+sl5+win8+wp8+wpa81/System.Threading.Tasks.dll", + "lib/portable-net40+sl5+win8+wp8+wpa81/System.Threading.Tasks.xml", + "lib/portable-net40+win8/ensureRedirect.xml", + "lib/portable-net40+win8/System.IO.dll", + "lib/portable-net40+win8/System.IO.xml", + "lib/portable-net40+win8/System.Runtime.dll", + "lib/portable-net40+win8/System.Runtime.xml", + "lib/portable-net40+win8/System.Threading.Tasks.dll", + "lib/portable-net40+win8/System.Threading.Tasks.xml", + "lib/portable-net40+win8+wp8+wpa81/ensureRedirect.xml", + "lib/portable-net40+win8+wp8+wpa81/System.IO.dll", + "lib/portable-net40+win8+wp8+wpa81/System.IO.xml", + "lib/portable-net40+win8+wp8+wpa81/System.Runtime.dll", + "lib/portable-net40+win8+wp8+wpa81/System.Runtime.xml", + "lib/portable-net40+win8+wp8+wpa81/System.Threading.Tasks.dll", + "lib/portable-net40+win8+wp8+wpa81/System.Threading.Tasks.xml", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/portable-net45+win8+wpa81/_._", + "lib/portable-net451+win81/_._", + "lib/portable-net451+win81+wpa81/_._", + "lib/portable-win81+wp81+wpa81/_._", + "lib/sl4/System.IO.dll", + "lib/sl4/System.IO.xml", + "lib/sl4/System.Runtime.dll", + "lib/sl4/System.Runtime.xml", + "lib/sl4/System.Threading.Tasks.dll", + "lib/sl4/System.Threading.Tasks.xml", + "lib/sl4-windowsphone71/ensureRedirect.xml", + "lib/sl4-windowsphone71/System.IO.dll", + "lib/sl4-windowsphone71/System.IO.xml", + "lib/sl4-windowsphone71/System.Runtime.dll", + "lib/sl4-windowsphone71/System.Runtime.xml", + "lib/sl4-windowsphone71/System.Threading.Tasks.dll", + "lib/sl4-windowsphone71/System.Threading.Tasks.xml", + "lib/sl5/System.IO.dll", + "lib/sl5/System.IO.xml", + "lib/sl5/System.Runtime.dll", + "lib/sl5/System.Runtime.xml", + "lib/sl5/System.Threading.Tasks.dll", + "lib/sl5/System.Threading.Tasks.xml", + "lib/win8/_._", + "lib/wp8/_._", + "lib/wpa81/_._" + ] + }, + "Microsoft.Bcl.Async/1.0.168": { + "sha512": "tUNC02eBwDKpGre0BcNIvblLv1q0Q3DnS/vtkRHj2FE1sXwt386HAudztyl5C0U88hllrqHDvtlz8bK0Y8cHDA==", + "files": [ + "License-Stable.rtf", + "Microsoft.Bcl.Async.1.0.168.nupkg", + "Microsoft.Bcl.Async.1.0.168.nupkg.sha512", + "Microsoft.Bcl.Async.nuspec", + "lib/net40/Microsoft.Threading.Tasks.dll", + "lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.dll", + "lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.xml", + "lib/net40/Microsoft.Threading.Tasks.Extensions.dll", + "lib/net40/Microsoft.Threading.Tasks.Extensions.xml", + "lib/net40/Microsoft.Threading.Tasks.xml", + "lib/portable-net40+sl4+win8+wp71+wpa81/Microsoft.Threading.Tasks.dll", + "lib/portable-net40+sl4+win8+wp71+wpa81/Microsoft.Threading.Tasks.Extensions.dll", + "lib/portable-net40+sl4+win8+wp71+wpa81/Microsoft.Threading.Tasks.Extensions.xml", + "lib/portable-net40+sl4+win8+wp71+wpa81/Microsoft.Threading.Tasks.xml", + "lib/portable-net45+win8+wp8+wpa81/Microsoft.Threading.Tasks.dll", + "lib/portable-net45+win8+wp8+wpa81/Microsoft.Threading.Tasks.Extensions.dll", + "lib/portable-net45+win8+wp8+wpa81/Microsoft.Threading.Tasks.Extensions.xml", + "lib/portable-net45+win8+wp8+wpa81/Microsoft.Threading.Tasks.xml", + "lib/portable-net45+win8+wpa81/Microsoft.Threading.Tasks.dll", + "lib/portable-net45+win8+wpa81/Microsoft.Threading.Tasks.Extensions.dll", + "lib/portable-net45+win8+wpa81/Microsoft.Threading.Tasks.Extensions.xml", + "lib/portable-net45+win8+wpa81/Microsoft.Threading.Tasks.xml", + "lib/sl4/Microsoft.Threading.Tasks.dll", + "lib/sl4/Microsoft.Threading.Tasks.Extensions.dll", + "lib/sl4/Microsoft.Threading.Tasks.Extensions.Silverlight.dll", + "lib/sl4/Microsoft.Threading.Tasks.Extensions.Silverlight.xml", + "lib/sl4/Microsoft.Threading.Tasks.Extensions.xml", + "lib/sl4/Microsoft.Threading.Tasks.xml", + "lib/sl4-windowsphone71/Microsoft.Threading.Tasks.dll", + "lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.dll", + "lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.Phone.dll", + "lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.Phone.xml", + "lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.xml", + "lib/sl4-windowsphone71/Microsoft.Threading.Tasks.xml", + "lib/win8/Microsoft.Threading.Tasks.dll", + "lib/win8/Microsoft.Threading.Tasks.Extensions.dll", + "lib/win8/Microsoft.Threading.Tasks.Extensions.xml", + "lib/win8/Microsoft.Threading.Tasks.xml", + "lib/wp8/Microsoft.Threading.Tasks.dll", + "lib/wp8/Microsoft.Threading.Tasks.Extensions.dll", + "lib/wp8/Microsoft.Threading.Tasks.Extensions.Phone.dll", + "lib/wp8/Microsoft.Threading.Tasks.Extensions.Phone.xml", + "lib/wp8/Microsoft.Threading.Tasks.Extensions.xml", + "lib/wp8/Microsoft.Threading.Tasks.xml", + "lib/wpa81/Microsoft.Threading.Tasks.dll", + "lib/wpa81/Microsoft.Threading.Tasks.Extensions.dll", + "lib/wpa81/Microsoft.Threading.Tasks.Extensions.xml", + "lib/wpa81/Microsoft.Threading.Tasks.xml" + ] + }, + "Microsoft.Bcl.Build/1.0.14": { + "sha512": "cDLKSvNvRa519hplsbSoYqO69TjdDIhfjtKUM0g20/nVROoWsGav9KCI9HtnGjLmdV1+TcUUDhbotcllibjPEA==", + "files": [ + "License-Stable.rtf", + "Microsoft.Bcl.Build.1.0.14.nupkg", + "Microsoft.Bcl.Build.1.0.14.nupkg.sha512", + "Microsoft.Bcl.Build.nuspec", + "content/net40/_._", + "content/netcore45/_._", + "content/portable-net40+win8+sl4+wp71+wpa81/_._", + "content/sl4/_._", + "content/sl4-windowsphone71/_._", + "tools/Install.ps1", + "tools/Microsoft.Bcl.Build.targets", + "tools/Microsoft.Bcl.Build.Tasks.dll", + "tools/Uninstall.ps1" + ] + }, + "Microsoft.CSharp/4.0.0-beta-23019": { + "sha512": "wp5SlNCIXAFqPbWMOAD8eedaPA1vPyBSh6P/OZUaSab4ogrFdElpHVoW+wTicbXLVJcvQwp1Jtk9xP5Slmq4EA==", + "files": [ + "Microsoft.CSharp.4.0.0-beta-23019.nupkg", + "Microsoft.CSharp.4.0.0-beta-23019.nupkg.sha512", + "Microsoft.CSharp.nuspec", + "lib/dotnet/Microsoft.CSharp.dll", + "lib/net45/_._", + "lib/netcore50/Microsoft.CSharp.dll", + "lib/win8/_._", + "ref/dotnet/Microsoft.CSharp.dll", + "ref/net45/_._", + "ref/netcore50/Microsoft.CSharp.dll", + "ref/win8/_._" + ] + }, + "Microsoft.Win32.Primitives/4.0.0-beta-23019": { + "sha512": "NzGxumVaWmLlNTY6AzQsVHxJjWXCjDnVvXIS+eLKQHhIC43gp9vG7MHmb8qKCntJsXrhx5nVbmQRbZXis9ugkg==", + "files": [ + "Microsoft.Win32.Primitives.4.0.0-beta-23019.nupkg", + "Microsoft.Win32.Primitives.4.0.0-beta-23019.nupkg.sha512", + "Microsoft.Win32.Primitives.nuspec", + "lib/dotnet/Microsoft.Win32.Primitives.dll", + "lib/net46/Microsoft.Win32.Primitives.dll", + "ref/dotnet/Microsoft.Win32.Primitives.dll", + "ref/net46/Microsoft.Win32.Primitives.dll" + ] + }, + "Microsoft.Win32.Registry/4.0.0-beta-23019": { + "sha512": "tjjlSjJbXM2Z2EOh9Q/f7YKp4DyEaIlwsJEDLxxNsvIK/xkoAjXgJjhPT+qWBsgV7Jtx36m6qn7Cx/PTrp+EGQ==", + "files": [ + "Microsoft.Win32.Registry.4.0.0-beta-23019.nupkg", + "Microsoft.Win32.Registry.4.0.0-beta-23019.nupkg.sha512", + "Microsoft.Win32.Registry.nuspec", + "lib/DNXCore50/Microsoft.Win32.Registry.dll", + "lib/net46/Microsoft.Win32.Registry.dll", + "ref/dotnet/Microsoft.Win32.Registry.dll", + "ref/net46/Microsoft.Win32.Registry.dll" + ] + }, + "System.Collections/4.0.10-beta-23019": { + "sha512": "MHZUp2LFl6sc22mBNHgM1vN5cQcxdcqPuQ3xRThg1UOH+eZ3rJIk5Ja+mkMFOdAiMB626u0fQMNEdNfItRyWuw==", + "files": [ + "System.Collections.4.0.10-beta-23019.nupkg", + "System.Collections.4.0.10-beta-23019.nupkg.sha512", + "System.Collections.nuspec", + "lib/DNXCore50/System.Collections.dll", + "lib/net46/_._", + "lib/netcore50/System.Collections.dll", + "ref/dotnet/System.Collections.dll", + "ref/net46/_._", + "runtimes/win8-aot/lib/netcore50/System.Collections.dll" + ] + }, + "System.Console/4.0.0-beta-23019": { + "sha512": "RuoqqvFoPFtGJXb8+yigoz8EmNIUFfrMvb1Ea6uMJbhd5nqCRvzjyyWBaDJBRNhVOCPVQldhU4q2rG2W2IfXDQ==", + "files": [ + "System.Console.4.0.0-beta-23019.nupkg", + "System.Console.4.0.0-beta-23019.nupkg.sha512", + "System.Console.nuspec", + "lib/DNXCore50/System.Console.dll", + "lib/net46/System.Console.dll", + "ref/dotnet/System.Console.dll", + "ref/net46/System.Console.dll" + ] + }, + "System.Diagnostics.Debug/4.0.10-beta-23019": { + "sha512": "xglZdS0wD8GeImZOnS+R1WGHYj3zcwRc0gpa1OTxb48mT49vgwzr0v3lIuGln7ARIUbj4jCGgQzpLMJf5ip/ag==", + "files": [ + "System.Diagnostics.Debug.4.0.10-beta-23019.nupkg", + "System.Diagnostics.Debug.4.0.10-beta-23019.nupkg.sha512", + "System.Diagnostics.Debug.nuspec", + "lib/DNXCore50/System.Diagnostics.Debug.dll", + "lib/net46/_._", + "lib/netcore50/System.Diagnostics.Debug.dll", + "ref/dotnet/System.Diagnostics.Debug.dll", + "ref/net46/_._", + "runtimes/win8-aot/lib/netcore50/System.Diagnostics.Debug.dll" + ] + }, + "System.Diagnostics.Process/4.0.0-beta-23019": { + "sha512": "1vuXv89pElI0JeDhnXokMyy9VkLpkDFa+oU3selb5uhHfzVswH1etFBumZ0VKKvTOAnm8AS/3ZDXAVlRjywq3A==", + "files": [ + "System.Diagnostics.Process.4.0.0-beta-23019.nupkg", + "System.Diagnostics.Process.4.0.0-beta-23019.nupkg.sha512", + "System.Diagnostics.Process.nuspec", + "lib/DNXCore50/System.Diagnostics.Process.dll", + "lib/net46/System.Diagnostics.Process.dll", + "ref/dotnet/System.Diagnostics.Process.dll", + "ref/net46/System.Diagnostics.Process.dll" + ] + }, + "System.Diagnostics.TraceSource/4.0.0-beta-23019": { + "sha512": "MZxMo9Skg9oZrJYwGpRfeOfrTfHxmTPWhj8XIXdIryfArzwG1FjZgzOrkWWcON0PdV9OywZYGly09nUCs/JdhA==", + "files": [ + "System.Diagnostics.TraceSource.4.0.0-beta-23019.nupkg", + "System.Diagnostics.TraceSource.4.0.0-beta-23019.nupkg.sha512", + "System.Diagnostics.TraceSource.nuspec", + "lib/DNXCore50/System.Diagnostics.TraceSource.dll", + "lib/net46/System.Diagnostics.TraceSource.dll", + "ref/dotnet/System.Diagnostics.TraceSource.dll", + "ref/net46/System.Diagnostics.TraceSource.dll" + ] + }, + "System.Dynamic.Runtime/4.0.0-beta-23019": { + "sha512": "N09LuTgPVDNxgUz+IZsX8j0nCzd7vBruIi/Qhjumy5vaaL3pKmKsPS1ZbyIrmwaHuP0GIfpNfdd3WAQWEf07Fw==", + "files": [ + "License.rtf", + "System.Dynamic.Runtime.4.0.0-beta-23019.nupkg", + "System.Dynamic.Runtime.4.0.0-beta-23019.nupkg.sha512", + "System.Dynamic.Runtime.nuspec", + "lib/net45/_._", + "lib/win8/_._", + "ref/dotnet/System.Dynamic.Runtime.dll", + "ref/net45/_._", + "ref/netcore50/System.Dynamic.Runtime.dll", + "ref/win8/_._" + ] + }, + "System.Globalization/4.0.10-beta-23019": { + "sha512": "zqYEXW3gedG4xYbX28Bw1TPddUJZWygfj8wWl1UMHtJsk4ihLLYAoSC/9VGq+WuYhSgN2n5WiD/LRt1CDWLDtQ==", + "files": [ + "System.Globalization.4.0.10-beta-23019.nupkg", + "System.Globalization.4.0.10-beta-23019.nupkg.sha512", + "System.Globalization.nuspec", + "lib/DNXCore50/System.Globalization.dll", + "lib/net46/_._", + "lib/netcore50/System.Globalization.dll", + "ref/dotnet/System.Globalization.dll", + "ref/net46/_._", + "runtimes/win8-aot/lib/netcore50/System.Globalization.dll" + ] + }, + "System.IO/4.0.10-beta-23019": { + "sha512": "/FgcleTGRMbI9XXlZCNNyNCLb+DzLXdyw2KqF1U0Su+Z8ztLBgpXGI9Vv1adnqRXXolBPNSlnHBMNEGqZzMYvA==", + "files": [ + "System.IO.4.0.10-beta-23019.nupkg", + "System.IO.4.0.10-beta-23019.nupkg.sha512", + "System.IO.nuspec", + "lib/DNXCore50/System.IO.dll", + "lib/net46/_._", + "lib/netcore50/System.IO.dll", + "ref/dotnet/System.IO.dll", + "ref/net46/_._", + "runtimes/win8-aot/lib/netcore50/System.IO.dll" + ] + }, + "System.IO.FileSystem/4.0.0-beta-23019": { + "sha512": "esYHMwzj2CoZGYMx0jDEai2pmaYsdIluz+pL9m8sPpdZhQQ8L7+MrOKrV272Sf6xaD7AUslNQsbrJBzEJxAhaA==", + "files": [ + "System.IO.FileSystem.4.0.0-beta-23019.nupkg", + "System.IO.FileSystem.4.0.0-beta-23019.nupkg.sha512", + "System.IO.FileSystem.nuspec", + "lib/DNXCore50/System.IO.FileSystem.dll", + "lib/net46/System.IO.FileSystem.dll", + "lib/netcore50/System.IO.FileSystem.dll", + "ref/dotnet/System.IO.FileSystem.dll", + "ref/net46/System.IO.FileSystem.dll" + ] + }, + "System.IO.FileSystem.Primitives/4.0.0-beta-23019": { + "sha512": "wGjn8X4EAnKEH4+uZ3CjiUCHW9WoXuWFNrzORmMhzvHpmxJUsiZkjvKhXGakclVlqMI+T4yn+MDwbrpC3TGofQ==", + "files": [ + "System.IO.FileSystem.Primitives.4.0.0-beta-23019.nupkg", + "System.IO.FileSystem.Primitives.4.0.0-beta-23019.nupkg.sha512", + "System.IO.FileSystem.Primitives.nuspec", + "lib/dotnet/System.IO.FileSystem.Primitives.dll", + "lib/net46/System.IO.FileSystem.Primitives.dll", + "ref/dotnet/System.IO.FileSystem.Primitives.dll", + "ref/net46/System.IO.FileSystem.Primitives.dll" + ] + }, + "System.Linq/4.0.0-beta-23019": { + "sha512": "jBHOkMRLTew/lr+awaPzEt5+rif4S7L9h/tY17unLaILq9P5muWVtsP2Tg/9YAJmHYoJDoCBKMpdGJ0hA5kqow==", + "files": [ + "System.Linq.4.0.0-beta-23019.nupkg", + "System.Linq.4.0.0-beta-23019.nupkg.sha512", + "System.Linq.nuspec", + "lib/dotnet/System.Linq.dll", + "lib/net45/_._", + "lib/netcore50/System.Linq.dll", + "lib/win8/_._", + "ref/dotnet/System.Linq.dll", + "ref/net45/_._", + "ref/netcore50/System.Linq.dll", + "ref/win8/_._" + ] + }, + "System.Linq.Expressions/4.0.0-beta-23019": { + "sha512": "F+gr9tKGrIZo11f3RpfOXuoSU7dUZfnNmkDeYKgHSIG4Q4knnUhIHcbRlS+5vUbeBYsUXMMQWMryEiOOG3kJLw==", + "files": [ + "License.rtf", + "System.Linq.Expressions.4.0.0-beta-23019.nupkg", + "System.Linq.Expressions.4.0.0-beta-23019.nupkg.sha512", + "System.Linq.Expressions.nuspec", + "lib/net45/_._", + "lib/win8/_._", + "ref/dotnet/System.Linq.Expressions.dll", + "ref/net45/_._", + "ref/netcore50/System.Linq.Expressions.dll", + "ref/win8/_._" + ] + }, + "System.ObjectModel/4.0.10-beta-23019": { + "sha512": "sJ+7kgWoTs4d8eNlhJB/p1Uq2iWHYVxO7ALNpB3sTwh3LORqwwPZe5FbSweccA3seM+zLSYa2AqBGp69JOXbcA==", + "files": [ + "System.ObjectModel.4.0.10-beta-23019.nupkg", + "System.ObjectModel.4.0.10-beta-23019.nupkg.sha512", + "System.ObjectModel.nuspec", + "lib/dotnet/System.ObjectModel.dll", + "lib/net46/_._", + "ref/dotnet/System.ObjectModel.dll", + "ref/net46/_._" + ] + }, + "System.Private.Uri/4.0.0-beta-23019": { + "sha512": "LV9WVCQ8W3ivP/hvQlaHH0lZKZyoYcUYiRGVw7xw/q8yfo2ZvwIrleXcLemxQkCSrXy80c5QmT9ErvrlFQK+Nw==", + "files": [ + "System.Private.Uri.4.0.0-beta-23019.nupkg", + "System.Private.Uri.4.0.0-beta-23019.nupkg.sha512", + "System.Private.Uri.nuspec", + "lib/DNXCore50/System.Private.Uri.dll", + "lib/netcore50/System.Private.Uri.dll", + "ref/dnxcore50/_._", + "ref/netcore50/_._", + "runtimes/win8-aot/lib/netcore50/System.Private.Uri.dll" + ] + }, + "System.Reflection/4.0.10-beta-23019": { + "sha512": "74fA068GDGipNfZxV3cQJe38djfHNrHPbKRrojOCLoecymaXlTGU917/nVxBuRwFehOsYwhMJ/B30m4YVEF/CA==", + "files": [ + "System.Reflection.4.0.10-beta-23019.nupkg", + "System.Reflection.4.0.10-beta-23019.nupkg.sha512", + "System.Reflection.nuspec", + "lib/DNXCore50/System.Reflection.dll", + "lib/net46/_._", + "lib/netcore50/System.Reflection.dll", + "ref/dotnet/System.Reflection.dll", + "ref/net46/_._", + "runtimes/win8-aot/lib/netcore50/System.Reflection.dll" + ] + }, + "System.Reflection.Extensions/4.0.0-beta-23019": { + "sha512": "fU02uzgKfO6lAUxR2eRHo6+JQ3/HqRi4zr38uOnieKtqV2dl8Cs2354gwYrjIxgxhkO1zLo70021P1cbpL7UIA==", + "files": [ + "System.Reflection.Extensions.4.0.0-beta-23019.nupkg", + "System.Reflection.Extensions.4.0.0-beta-23019.nupkg.sha512", + "System.Reflection.Extensions.nuspec", + "lib/DNXCore50/System.Reflection.Extensions.dll", + "lib/net45/_._", + "lib/netcore50/System.Reflection.Extensions.dll", + "lib/win8/_._", + "ref/dotnet/System.Reflection.Extensions.dll", + "ref/net45/_._", + "ref/netcore50/System.Reflection.Extensions.dll", + "ref/win8/_._", + "runtimes/win8-aot/lib/netcore50/System.Reflection.Extensions.dll" + ] + }, + "System.Reflection.Primitives/4.0.0-beta-23019": { + "sha512": "t9KyeV51eRgTby/D9Ri6cIKeA9KUOGH5+EEXBdfaSbkCO/lrJ/7b8BclFu+HKEXJd3/ZpD0lOdw4k8kwIeL3ww==", + "files": [ + "System.Reflection.Primitives.4.0.0-beta-23019.nupkg", + "System.Reflection.Primitives.4.0.0-beta-23019.nupkg.sha512", + "System.Reflection.Primitives.nuspec", + "lib/DNXCore50/System.Reflection.Primitives.dll", + "lib/net45/_._", + "lib/netcore50/System.Reflection.Primitives.dll", + "lib/win8/_._", + "ref/dotnet/System.Reflection.Primitives.dll", + "ref/net45/_._", + "ref/netcore50/System.Reflection.Primitives.dll", + "ref/win8/_._", + "runtimes/win8-aot/lib/netcore50/System.Reflection.Primitives.dll" + ] + }, + "System.Reflection.TypeExtensions/4.0.0-beta-23019": { + "sha512": "5/WcPvsdnw0d8rwwsCgQKoo9oXFQA1gMHtyNcYjelDjaaYC/dYoU7Eo0JdP+0PMgy9FnBOHVjRHOTcJ2HIjefA==", + "files": [ + "System.Reflection.TypeExtensions.4.0.0-beta-23019.nupkg", + "System.Reflection.TypeExtensions.4.0.0-beta-23019.nupkg.sha512", + "System.Reflection.TypeExtensions.nuspec", + "lib/DNXCore50/System.Reflection.TypeExtensions.dll", + "lib/net46/System.Reflection.TypeExtensions.dll", + "lib/netcore50/System.Reflection.TypeExtensions.dll", + "ref/dotnet/System.Reflection.TypeExtensions.dll", + "ref/net46/System.Reflection.TypeExtensions.dll", + "runtimes/win8-aot/lib/netcore50/System.Reflection.TypeExtensions.dll" + ] + }, + "System.Resources.ResourceManager/4.0.0-beta-23019": { + "sha512": "me0PnbhuwqsRTUmA2ckfj059r6yJP/wQqh3L51zS/iLJ8N0CjSi9ndzAwoRVhfS2BRTgpgHO2xTas3vY2gTwkg==", + "files": [ + "System.Resources.ResourceManager.4.0.0-beta-23019.nupkg", + "System.Resources.ResourceManager.4.0.0-beta-23019.nupkg.sha512", + "System.Resources.ResourceManager.nuspec", + "lib/DNXCore50/System.Resources.ResourceManager.dll", + "lib/net45/_._", + "lib/netcore50/System.Resources.ResourceManager.dll", + "lib/win8/_._", + "ref/dotnet/System.Resources.ResourceManager.dll", + "ref/net45/_._", + "ref/netcore50/System.Resources.ResourceManager.dll", + "ref/win8/_._", + "runtimes/win8-aot/lib/netcore50/System.Resources.ResourceManager.dll" + ] + }, + "System.Runtime/4.0.20-beta-23019": { + "sha512": "74Ba0KeqUX4ziLuALD5zSDWbYFg2Hw8IloKILkm8UHe5vkFCzHIb9tARXLClDjTxXQ/G/hyXgV8N0YlKHX7dAA==", + "files": [ + "System.Runtime.4.0.20-beta-23019.nupkg", + "System.Runtime.4.0.20-beta-23019.nupkg.sha512", + "System.Runtime.nuspec", + "lib/DNXCore50/System.Runtime.dll", + "lib/net46/_._", + "lib/netcore50/System.Runtime.dll", + "ref/dotnet/System.Runtime.dll", + "ref/net46/_._", + "runtimes/win8-aot/lib/netcore50/System.Runtime.dll" + ] + }, + "System.Runtime.Extensions/4.0.10-beta-23019": { + "sha512": "G1DElWXwzoQgAWMZX63gwgSMckcLnxA70xTwZTx/VmQQG2+kqDuUoFVywdBeC9yaba0xK2h7Q01+H4/FGDClSg==", + "files": [ + "System.Runtime.Extensions.4.0.10-beta-23019.nupkg", + "System.Runtime.Extensions.4.0.10-beta-23019.nupkg.sha512", + "System.Runtime.Extensions.nuspec", + "lib/DNXCore50/System.Runtime.Extensions.dll", + "lib/net46/_._", + "lib/netcore50/System.Runtime.Extensions.dll", + "ref/dotnet/System.Runtime.Extensions.dll", + "ref/net46/_._", + "runtimes/win8-aot/lib/netcore50/System.Runtime.Extensions.dll" + ] + }, + "System.Runtime.Handles/4.0.0-beta-23019": { + "sha512": "7yUKDrX/q6iXj0daFW7LM3Fe5qY0l9hIcd4OxLzb8vcwHvxTvcTK11jMMPwtwlv3xjTqUG+FxYfonKXENQ4a2Q==", + "files": [ + "System.Runtime.Handles.4.0.0-beta-23019.nupkg", + "System.Runtime.Handles.4.0.0-beta-23019.nupkg.sha512", + "System.Runtime.Handles.nuspec", + "lib/DNXCore50/System.Runtime.Handles.dll", + "lib/net46/_._", + "lib/netcore50/System.Runtime.Handles.dll", + "ref/dotnet/System.Runtime.Handles.dll", + "ref/net46/_._", + "runtimes/win8-aot/lib/netcore50/System.Runtime.Handles.dll" + ] + }, + "System.Runtime.InteropServices/4.0.20-beta-23019": { + "sha512": "KYzLtkN65ySMGpQ/uvHFSdu3hcFmp0Y8Foh16bWCT+xNeHVFIY8A8j5oqUYHbOwJuPNrwoIBOsHisVrD6mRfkA==", + "files": [ + "System.Runtime.InteropServices.4.0.20-beta-23019.nupkg", + "System.Runtime.InteropServices.4.0.20-beta-23019.nupkg.sha512", + "System.Runtime.InteropServices.nuspec", + "lib/DNXCore50/System.Runtime.InteropServices.dll", + "lib/net46/_._", + "lib/netcore50/System.Runtime.InteropServices.dll", + "ref/dotnet/System.Runtime.InteropServices.dll", + "ref/net46/_._", + "runtimes/win8-aot/lib/netcore50/System.Runtime.InteropServices.dll" + ] + }, + "System.Security.Cryptography.Encryption/4.0.0-beta-23019": { + "sha512": "W95rPBfpgVShPysa/TcLKYQvKjFO0Uq6Obo2DYpKM2+N6SoEVHaBWTxxoImq7vJT/jSlDf0K+SREFBGSj6Gj5A==", + "files": [ + "System.Security.Cryptography.Encryption.4.0.0-beta-23019.nupkg", + "System.Security.Cryptography.Encryption.4.0.0-beta-23019.nupkg.sha512", + "System.Security.Cryptography.Encryption.nuspec", + "lib/DNXCore50/System.Security.Cryptography.Encryption.dll", + "lib/net46/System.Security.Cryptography.Encryption.dll", + "ref/dotnet/System.Security.Cryptography.Encryption.dll", + "ref/net46/System.Security.Cryptography.Encryption.dll" + ] + }, + "System.Security.SecureString/4.0.0-beta-23019": { + "sha512": "VqnglApw6FC+TLD7wz45HGjTDuJjkUmAJGmhjk1FxcnHziJCYkVgxg8OMtEXS2wHvNwEDfVdTdo/8j2hmxrzsA==", + "files": [ + "System.Security.SecureString.4.0.0-beta-23019.nupkg", + "System.Security.SecureString.4.0.0-beta-23019.nupkg.sha512", + "System.Security.SecureString.nuspec", + "lib/DNXCore50/System.Security.SecureString.dll", + "lib/net46/System.Security.SecureString.dll", + "ref/dotnet/System.Security.SecureString.dll", + "ref/net46/System.Security.SecureString.dll" + ] + }, + "System.Text.Encoding/4.0.10-beta-23019": { + "sha512": "NKMM7EowhH4JzVRNip0l8RZqMy934A98sLGUpddQslUus5N3Qsbg+mUTpGjd3X0ns2kASjmJFvvh5i8hh9qMMQ==", + "files": [ + "System.Text.Encoding.4.0.10-beta-23019.nupkg", + "System.Text.Encoding.4.0.10-beta-23019.nupkg.sha512", + "System.Text.Encoding.nuspec", + "lib/DNXCore50/System.Text.Encoding.dll", + "lib/net46/_._", + "lib/netcore50/System.Text.Encoding.dll", + "ref/dotnet/System.Text.Encoding.dll", + "ref/net46/_._", + "runtimes/win8-aot/lib/netcore50/System.Text.Encoding.dll" + ] + }, + "System.Text.Encoding.Extensions/4.0.10-beta-23019": { + "sha512": "LBtVrbFvCa0GAAT7z5m/w0dMSynoqPi+11C670me7+1tmW9rnj5O0DGTR9x1GgUgcqf1I+t5lGFyvrHO14++oQ==", + "files": [ + "System.Text.Encoding.Extensions.4.0.10-beta-23019.nupkg", + "System.Text.Encoding.Extensions.4.0.10-beta-23019.nupkg.sha512", + "System.Text.Encoding.Extensions.nuspec", + "lib/DNXCore50/System.Text.Encoding.Extensions.dll", + "lib/net46/_._", + "lib/netcore50/System.Text.Encoding.Extensions.dll", + "ref/dotnet/System.Text.Encoding.Extensions.dll", + "ref/net46/_._", + "runtimes/win8-aot/lib/netcore50/System.Text.Encoding.Extensions.dll" + ] + }, + "System.Text.RegularExpressions/4.0.0-beta-23019": { + "sha512": "hH/tBle6TkkP/nlIwcQxq8nVZ9RZtuJXmzR06e8KFNg60z6/rEpmQgdE5wfSNQ/E2gsFkezAxmGKb1F3A6aNUw==", + "files": [ + "License.rtf", + "System.Text.RegularExpressions.4.0.0-beta-23019.nupkg", + "System.Text.RegularExpressions.4.0.0-beta-23019.nupkg.sha512", + "System.Text.RegularExpressions.nuspec", + "lib/net45/_._", + "lib/win8/_._", + "ref/dotnet/System.Text.RegularExpressions.dll", + "ref/net45/_._", + "ref/netcore50/System.Text.RegularExpressions.dll", + "ref/win8/_._" + ] + }, + "System.Threading/4.0.10-beta-23019": { + "sha512": "ss8p5o4C+f+rjpq0hxrcFsRXGUF+ojzjsW9MKfLrAqTuXhQywwDAPiTEvvEmDG8ptpwfQHWR09jlhcBNFhkG6w==", + "files": [ + "System.Threading.4.0.10-beta-23019.nupkg", + "System.Threading.4.0.10-beta-23019.nupkg.sha512", + "System.Threading.nuspec", + "lib/DNXCore50/System.Threading.dll", + "lib/net46/_._", + "lib/netcore50/System.Threading.dll", + "ref/dotnet/System.Threading.dll", + "ref/net46/_._", + "runtimes/win8-aot/lib/netcore50/System.Threading.dll" + ] + }, + "System.Threading.Overlapped/4.0.0-beta-23019": { + "sha512": "oiv9uNcR5hz20g6x6Ci1BgAREWBNu7yLhAJ1/zTWbBgmUusM6g/QITdynCp3EFgLs5vO36WaCV9Ct8iNwnmRfw==", + "files": [ + "System.Threading.Overlapped.4.0.0-beta-23019.nupkg", + "System.Threading.Overlapped.4.0.0-beta-23019.nupkg.sha512", + "System.Threading.Overlapped.nuspec", + "lib/DNXCore50/System.Threading.Overlapped.dll", + "lib/net46/System.Threading.Overlapped.dll", + "lib/netcore50/System.Threading.Overlapped.dll", + "ref/dotnet/System.Threading.Overlapped.dll", + "ref/net46/System.Threading.Overlapped.dll" + ] + }, + "System.Threading.Tasks/4.0.10-beta-23019": { + "sha512": "drgS00Han7hhU1Wpw8aVCrVrZxaSlHddAsHZTomgZqDioG3IFblN09RMeNtaL4m5DLHt+cuzyvNFKUMdjxiklg==", + "files": [ + "System.Threading.Tasks.4.0.10-beta-23019.nupkg", + "System.Threading.Tasks.4.0.10-beta-23019.nupkg.sha512", + "System.Threading.Tasks.nuspec", + "lib/DNXCore50/System.Threading.Tasks.dll", + "lib/net46/_._", + "lib/netcore50/System.Threading.Tasks.dll", + "ref/dotnet/System.Threading.Tasks.dll", + "ref/net46/_._", + "runtimes/win8-aot/lib/netcore50/System.Threading.Tasks.dll" + ] + }, + "System.Threading.Thread/4.0.0-beta-23019": { + "sha512": "ECx+zZlXCfhkpZ0PUVrzp5UB6zRdzi94LsQhm7DtUS/uB17I3sYh0RsnMu/5jTULByQ1Ju4K/JTbM28InXO/PQ==", + "files": [ + "System.Threading.Thread.4.0.0-beta-23019.nupkg", + "System.Threading.Thread.4.0.0-beta-23019.nupkg.sha512", + "System.Threading.Thread.nuspec", + "lib/DNXCore50/System.Threading.Thread.dll", + "lib/net46/System.Threading.Thread.dll", + "ref/dotnet/System.Threading.Thread.dll", + "ref/net46/System.Threading.Thread.dll" + ] + }, + "System.Threading.ThreadPool/4.0.10-beta-23019": { + "sha512": "rYny/TIJFP4FVDIDRRrgGaoeAWno4pomqGFBFFGwm8UR6zOypqq5+n3mn6RyxcNH/PadefEADFs9mhfz6CmcfQ==", + "files": [ + "System.Threading.ThreadPool.4.0.10-beta-23019.nupkg", + "System.Threading.ThreadPool.4.0.10-beta-23019.nupkg.sha512", + "System.Threading.ThreadPool.nuspec", + "lib/DNXCore50/System.Threading.ThreadPool.dll", + "lib/net46/System.Threading.ThreadPool.dll", + "ref/dotnet/System.Threading.ThreadPool.dll", + "ref/net46/System.Threading.ThreadPool.dll" + ] + }, + "System.Threading.Timer/4.0.0-beta-23019": { + "sha512": "nGA/Vt5zC8zGQ8r9mSdRTWzVMXh1YgJH9XH8x5OQZVLh0hn6CSC32RrmUrmKLpxKd64B9mbKoubeLUqXlf/m8g==", + "files": [ + "System.Threading.Timer.4.0.0-beta-23019.nupkg", + "System.Threading.Timer.4.0.0-beta-23019.nupkg.sha512", + "System.Threading.Timer.nuspec", + "lib/DNXCore50/System.Threading.Timer.dll", + "lib/net451/_._", + "lib/netcore50/System.Threading.Timer.dll", + "lib/win81/_._", + "ref/dotnet/System.Threading.Timer.dll", + "ref/net451/_._", + "ref/netcore50/System.Threading.Timer.dll", + "ref/win81/_._", + "runtimes/win8-aot/lib/netcore50/System.Threading.Timer.dll" + ] + } + }, + "projectFileDependencyGroups": { + "": [], + ".NETFramework,Version=v4.0": [ + "Microsoft.Bcl.Async >= 1.0.168", + "fx/System.Configuration ", + "fx/Microsoft.CSharp " + ], + ".NETFramework,Version=v4.5": [ + "fx/System.Configuration " + ], + "DNX,Version=v4.5.1": [ + "fx/System.Runtime ", + "fx/System.Configuration " + ], + ".NETPortable,Version=v4.5,Profile=Profile259": [ + "fx/System.Collections ", + "fx/System.Globalization ", + "fx/System.Runtime ", + "fx/System.Runtime.Extensions ", + "fx/System.Linq ", + "fx/System.IO ", + "fx/System.Reflection ", + "fx/System.Reflection.Extensions ", + "fx/System.Text.RegularExpressions ", + "fx/System.Diagnostics.Debug ", + "fx/System.Threading ", + "fx/System.Threading.Tasks ", + "fx/Microsoft.CSharp " + ], + "DNXCore,Version=v5.0": [ + "System.Collections >= 4.0.10-beta-23019", + "System.Console >= 4.0.0-beta-23019", + "System.Linq >= 4.0.0-beta-23019", + "System.Text.RegularExpressions >= 4.0.0-beta-23019", + "System.Threading >= 4.0.10-beta-23019", + "System.Threading.Thread >= 4.0.0-beta-23019", + "System.Threading.Timer >= 4.0.0-beta-23019", + "Microsoft.CSharp >= 4.0.0-beta-23019", + "System.Runtime >= 4.0.20-beta-23019", + "System.Runtime.Extensions >= 4.0.10-beta-23019", + "System.IO.FileSystem >= 4.0.0-beta-23019", + "System.Diagnostics.TraceSource >= 4.0.0-beta-23019", + "System.Diagnostics.Process >= 4.0.0-beta-23019" + ] + } +} \ No newline at end of file diff --git a/test/Serilog.MsTests/Serilog.MsTests.csproj b/test/Serilog.MsTests/Serilog.MsTests.csproj index 6f04e2330..5d72a5b36 100644 --- a/test/Serilog.MsTests/Serilog.MsTests.csproj +++ b/test/Serilog.MsTests/Serilog.MsTests.csproj @@ -53,16 +53,6 @@ - - - {7A9E1095-167D-402A-B43D-B36B97FF183D} - Serilog.FullNetFx - - - {0915DBD9-0F7C-4439-8D9E-74C3D579B219} - Serilog - - diff --git a/test/Serilog.PerformanceTests/Serilog.PerformanceTests.csproj b/test/Serilog.PerformanceTests/Serilog.PerformanceTests.csproj index c5093442c..a96f012cc 100644 --- a/test/Serilog.PerformanceTests/Serilog.PerformanceTests.csproj +++ b/test/Serilog.PerformanceTests/Serilog.PerformanceTests.csproj @@ -46,15 +46,5 @@ - - - {7a9e1095-167d-402a-b43d-b36b97ff183d} - Serilog.FullNetFx - - - {0915DBD9-0F7C-4439-8D9E-74C3D579B219} - Serilog - - \ No newline at end of file diff --git a/test/Serilog.SmokeTest/Serilog.SmokeTest.csproj b/test/Serilog.SmokeTest/Serilog.SmokeTest.csproj index 4dc787b8c..cb3bddb10 100644 --- a/test/Serilog.SmokeTest/Serilog.SmokeTest.csproj +++ b/test/Serilog.SmokeTest/Serilog.SmokeTest.csproj @@ -46,15 +46,5 @@ - - - {7a9e1095-167d-402a-b43d-b36b97ff183d} - Serilog.FullNetFx - - - {0915dbd9-0f7c-4439-8d9e-74c3d579b219} - Serilog - - \ No newline at end of file diff --git a/test/Serilog.SmokeTest/Serilog.aspnetcore50.SmokeTest.kproj b/test/Serilog.SmokeTest/Serilog.aspnetcore50.SmokeTest.kproj deleted file mode 100644 index 0481157ec..000000000 --- a/test/Serilog.SmokeTest/Serilog.aspnetcore50.SmokeTest.kproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - ce11be0d-f4f8-4d34-ac74-f7e9ab344ec3 - Console - Serilog.SmokeTest - - - 2.0 - - - \ No newline at end of file diff --git a/test/Serilog.SmokeTest/project.json b/test/Serilog.SmokeTest/project.json deleted file mode 100644 index fc18967ca..000000000 --- a/test/Serilog.SmokeTest/project.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "dependencies": { - }, - - "frameworks": { - "aspnetcore50": { - "dependencies": { - "System.Runtime": "4.0.20-beta-22231", - "System.Reflection": "4.0.10-beta-22231", - "System.Reflection.TypeExtensions": "4.0.0-beta-22231", - "Serilog": "", - "Serilog.FullNetFx": "" - } - } - } -} diff --git a/test/Serilog.Tests/Serilog.Tests.csproj b/test/Serilog.Tests/Serilog.Tests.csproj index 4fb3c53a1..e87711582 100644 --- a/test/Serilog.Tests/Serilog.Tests.csproj +++ b/test/Serilog.Tests/Serilog.Tests.csproj @@ -106,16 +106,6 @@ - - - {7a9e1095-167d-402a-b43d-b36b97ff183d} - Serilog.FullNetFx - - - {0915DBD9-0F7C-4439-8D9E-74C3D579B219} - Serilog - - Serilog.snk