You've already forked linux-packaging-mono
Imported Upstream version 5.2.0.175
Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
parent
4bdbaf4a88
commit
966bba02bb
@@ -1,86 +1,50 @@
|
||||

|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.31101.0
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Diagnostics.TraceSource.Tests", "tests\System.Diagnostics.TraceSource.Tests.csproj", "{7B32D24D-969A-4F7F-8461-B43E15E5D553}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334} = {5380420C-EB1D-4C53-9CFC-916578C18334}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{47919FF5-DA40-4D99-AF2D-F560282AA913}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
..\.nuget\packages.Windows_NT.config = ..\.nuget\packages.Windows_NT.config
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Diagnostics.TraceSource", "src\System.Diagnostics.TraceSource.csproj", "{5380420C-EB1D-4C53-9CFC-916578C18334}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6E515D9C-A5C2-4716-96A1-4716F007267D} = {6E515D9C-A5C2-4716-96A1-4716F007267D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Diagnostics.TraceSource", "src\System.Diagnostics.TraceSource.csproj", "{5380420C-EB1D-4C53-9CFC-916578C18334}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Diagnostics.TraceSource", "ref\System.Diagnostics.TraceSource.csproj", "{6E515D9C-A5C2-4716-96A1-4716F007267D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1A2F9F4A-A032-433E-B914-ADD5992BB178}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU = DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU
|
||||
ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU = ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU
|
||||
DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU = DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU
|
||||
ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU = ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU
|
||||
DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU = DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU
|
||||
ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU = ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU
|
||||
DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU = DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU
|
||||
ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU = ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU
|
||||
DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU = DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU
|
||||
ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU = ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU
|
||||
DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU = DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU
|
||||
ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU = ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = net463-Windows_NT-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = net463-Windows_NT-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.ActiveCfg = net463-Windows_NT-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Unix|AnyCPU.Build.0 = net463-Windows_NT-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = net463-Windows_NT-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.DebugNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = net463-Windows_NT-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.ActiveCfg = net463-Windows_NT-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp-Windows_NT|AnyCPU.Build.0 = net463-Windows_NT-Release|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.Debug|Any CPU.ActiveCfg = netstandard-Windows_NT-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.Debug|Any CPU.Build.0 = netstandard-Windows_NT-Debug|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.Release|Any CPU.ActiveCfg = netstandard-Windows_NT-Release|Any CPU
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553}.Release|Any CPU.Build.0 = netstandard-Windows_NT-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{6E515D9C-A5C2-4716-96A1-4716F007267D}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{6E515D9C-A5C2-4716-96A1-4716F007267D}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{6E515D9C-A5C2-4716-96A1-4716F007267D}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{6E515D9C-A5C2-4716-96A1-4716F007267D}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{7B32D24D-969A-4F7F-8461-B43E15E5D553} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
|
||||
{5380420C-EB1D-4C53-9CFC-916578C18334} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD}
|
||||
{6E515D9C-A5C2-4716-96A1-4716F007267D} = {2E666815-2EDB-464B-9DF6-380BF4789AD4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@@ -4,5 +4,6 @@
|
||||
<PropertyGroup>
|
||||
<AssemblyVersion>4.1.0.0</AssemblyVersion>
|
||||
<IsNETCoreApp>true</IsNETCoreApp>
|
||||
<IsUAP>true</IsUAP>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -1,6 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{6E515D9C-A5C2-4716-96A1-4716F007267D}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Debug|AnyCPU'" />
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<BuildConfigurations>
|
||||
netcoreapp-Unix;
|
||||
netcoreapp-Windows_NT;
|
||||
net463-Windows_NT;
|
||||
uap-Windows_NT;
|
||||
</BuildConfigurations>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -1,64 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
@@ -117,12 +58,12 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ExceptionOccurred" xml:space="preserve">
|
||||
<value>An exception occurred while writing to the log file {0}: {1}.</value>
|
||||
</data>
|
||||
<data name="MustAddListener" xml:space="preserve">
|
||||
<value>Only TraceListeners can be added to a TraceListenerCollection.</value>
|
||||
</data>
|
||||
<data name="IndentSize" xml:space="preserve">
|
||||
<value>The IndentSize property must be non-negative.</value>
|
||||
</data>
|
||||
<data name="TraceListenerFail" xml:space="preserve">
|
||||
<value>Fail:</value>
|
||||
</data>
|
||||
@@ -138,9 +79,6 @@
|
||||
<data name="DebugAssertLongMessage" xml:space="preserve">
|
||||
<value>---- Assert Long Message ----</value>
|
||||
</data>
|
||||
<data name="ExceptionOccurred" xml:space="preserve">
|
||||
<value>An exception occurred writing trace output to log file '{0}'. {1}</value>
|
||||
</data>
|
||||
<data name="TraceSwitchLevelTooLow" xml:space="preserve">
|
||||
<value>Attempted to set {0} to a value that is too low. Setting level to TraceLevel.Off</value>
|
||||
</data>
|
||||
@@ -153,10 +91,4 @@
|
||||
<data name="InvalidNullEmptyArgument" xml:space="preserve">
|
||||
<value>Argument {0} cannot be null or zero-length.</value>
|
||||
</data>
|
||||
<data name="DebugAssertTitle" xml:space="preserve">
|
||||
<value>Assertion Failed: Cancel=Debug, OK=Continue</value>
|
||||
</data>
|
||||
<data name="RTL" xml:space="preserve">
|
||||
<value>RTL_False</value>
|
||||
</data>
|
||||
</root>
|
@@ -6,19 +6,18 @@
|
||||
<AssemblyName>System.Diagnostics.TraceSource</AssemblyName>
|
||||
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
|
||||
<ProjectGuid>{5380420C-EB1D-4C53-9CFC-916578C18334}</ProjectGuid>
|
||||
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'net463'">true</IsPartialFacadeAssembly>
|
||||
</PropertyGroup>
|
||||
<!-- Help VS understand available configurations -->
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Unix-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Unix-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Windows_NT-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Windows_NT-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='net463-Windows_NT-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='net463-Windows_NT-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Unix-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Unix-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Release|AnyCPU'" />
|
||||
<ItemGroup>
|
||||
<Compile Include="FxCopBaseline.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
|
||||
<ItemGroup>
|
||||
<Compile Include="System\Diagnostics\BooleanSwitch.cs" />
|
||||
<Compile Include="System\Diagnostics\CorrelationManager.cs" />
|
||||
<Compile Include="System\Diagnostics\DefaultTraceListener.cs" />
|
||||
@@ -42,7 +41,7 @@
|
||||
<Compile Include="System\Diagnostics\SwitchAttribute.cs" />
|
||||
<Compile Include="System\Diagnostics\SwitchLevelAttribute.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(TargetsWindows)' == 'true' And '$(TargetGroup)' == 'netcoreapp'">
|
||||
<ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
|
||||
<Compile Include="System\Diagnostics\TraceEventCache.Windows.cs" />
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs">
|
||||
<Link>Common\Interop\Windows\Interop.Libraries.cs</Link>
|
||||
@@ -51,7 +50,7 @@
|
||||
<Link>Common\Interop\Windows\Interop.GetCurrentProcessId.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(TargetsUnix)' == 'true' And '$(TargetGroup)' == 'netcoreapp'">
|
||||
<ItemGroup Condition=" '$(TargetsUnix)' == 'true'">
|
||||
<Compile Include="$(CommonPath)\Interop\Unix\Interop.Libraries.cs">
|
||||
<Link>Common\Interop\Unix\Interop.Libraries.cs</Link>
|
||||
</Compile>
|
||||
@@ -60,16 +59,13 @@
|
||||
</Compile>
|
||||
<Compile Include="System\Diagnostics\TraceEventCache.Unix.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'net463'">
|
||||
<TargetingPackReference Include="mscorlib" />
|
||||
<TargetingPackReference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Collections" />
|
||||
<Reference Include="System.Collections.NonGeneric" />
|
||||
<Reference Include="System.Collections.Specialized" />
|
||||
<Reference Include="System.Diagnostics.Debug" />
|
||||
<Reference Include="System.Diagnostics.Tools" />
|
||||
<Reference Include="System.IO.FileSystem" />
|
||||
<Reference Include="System.Resources.ResourceManager" />
|
||||
<Reference Include="System.Runtime" />
|
||||
<Reference Include="System.Runtime.Extensions" />
|
||||
|
@@ -115,7 +115,33 @@ namespace System.Diagnostics
|
||||
/// </devdoc>
|
||||
public override void Write(string message)
|
||||
{
|
||||
if (NeedIndent) WriteIndent();
|
||||
Write(message, useLogFile: true);
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Writes the output followed by a line terminator using <see cref="System.Diagnostics.Debug.Write"/>.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public override void WriteLine(string message)
|
||||
{
|
||||
WriteLine(message, useLogFile: true);
|
||||
}
|
||||
|
||||
private void WriteLine(string message, bool useLogFile)
|
||||
{
|
||||
if (NeedIndent)
|
||||
WriteIndent();
|
||||
|
||||
// The concat is done here to enable a single call to Write
|
||||
Write(message + Environment.NewLine, useLogFile);
|
||||
NeedIndent = true;
|
||||
}
|
||||
|
||||
private void Write(string message, bool useLogFile)
|
||||
{
|
||||
if (NeedIndent)
|
||||
WriteIndent();
|
||||
|
||||
// really huge messages mess up both VS and dbmon, so we chop it up into
|
||||
// reasonable chunks if it's too big
|
||||
@@ -132,20 +158,21 @@ namespace System.Diagnostics
|
||||
}
|
||||
Debug.Write(message.Substring(offset));
|
||||
}
|
||||
|
||||
if (useLogFile && !string.IsNullOrEmpty(LogFileName))
|
||||
WriteToLogFile(message);
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Writes the output followed by a line terminator using <see cref="System.Diagnostics.Debug.Write"/>.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public override void WriteLine(string message)
|
||||
private void WriteToLogFile(string message)
|
||||
{
|
||||
if (NeedIndent) WriteIndent();
|
||||
// I do the concat here to make sure it goes as one call to the output.
|
||||
// we would save a stringbuilder operation by calling Write twice.
|
||||
Write(message + Environment.NewLine);
|
||||
NeedIndent = true;
|
||||
try
|
||||
{
|
||||
File.AppendAllText(LogFileName, message);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
WriteLine(string.Format(SR.ExceptionOccurred, LogFileName, e.ToString()), useLogFile: false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -26,24 +26,24 @@ namespace System.Diagnostics
|
||||
private bool _initializing = false;
|
||||
private volatile string _switchValueString = String.Empty;
|
||||
private string _defaultValue;
|
||||
private object _intializedLock;
|
||||
private object _initializedLock;
|
||||
|
||||
private static List<WeakReference> s_switches = new List<WeakReference>();
|
||||
private static int s_LastCollectionCount;
|
||||
private StringDictionary _attributes;
|
||||
|
||||
private object IntializedLock
|
||||
private object InitializedLock
|
||||
{
|
||||
[SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "Reviewed for thread-safety")]
|
||||
get
|
||||
{
|
||||
if (_intializedLock == null)
|
||||
if (_initializedLock == null)
|
||||
{
|
||||
Object o = new Object();
|
||||
Interlocked.CompareExchange<Object>(ref _intializedLock, o, null);
|
||||
Interlocked.CompareExchange<Object>(ref _initializedLock, o, null);
|
||||
}
|
||||
|
||||
return _intializedLock;
|
||||
return _initializedLock;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace System.Diagnostics
|
||||
set
|
||||
{
|
||||
bool didUpdate = false;
|
||||
lock (IntializedLock)
|
||||
lock (InitializedLock)
|
||||
{
|
||||
_initialized = true;
|
||||
if (_switchSetting != value)
|
||||
@@ -197,7 +197,7 @@ namespace System.Diagnostics
|
||||
{
|
||||
if (!_initialized)
|
||||
{
|
||||
lock (IntializedLock)
|
||||
lock (InitializedLock)
|
||||
{
|
||||
if (_initialized || _initializing)
|
||||
{
|
||||
@@ -251,7 +251,7 @@ namespace System.Diagnostics
|
||||
|
||||
internal void Refresh()
|
||||
{
|
||||
lock (IntializedLock)
|
||||
lock (InitializedLock)
|
||||
{
|
||||
_initialized = false;
|
||||
Initialize();
|
||||
|
@@ -236,7 +236,7 @@ namespace System.Diagnostics
|
||||
{
|
||||
foreach (TraceListener listener in Listeners)
|
||||
{
|
||||
listener.Dispose();
|
||||
listener.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -104,7 +104,7 @@ namespace System.Diagnostics
|
||||
{
|
||||
foreach (TraceListener listener in _listeners)
|
||||
{
|
||||
listener.Dispose();
|
||||
listener.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -3,19 +3,22 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using Xunit;
|
||||
|
||||
namespace System.Diagnostics.TraceSourceTests
|
||||
{
|
||||
public class DefaultTraceListenerClassTests
|
||||
public class DefaultTraceListenerClassTests : FileCleanupTestBase
|
||||
{
|
||||
private class TestDefaultTraceListener : DefaultTraceListener
|
||||
{
|
||||
private StringWriter _writer;
|
||||
public bool ShouldOverrideWriteLine { get; set; } = true;
|
||||
|
||||
public TestDefaultTraceListener()
|
||||
{
|
||||
_writer = new StringWriter();
|
||||
AssertUiEnabled = false;
|
||||
}
|
||||
|
||||
public String Output
|
||||
@@ -27,6 +30,18 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
{
|
||||
_writer.Write(message);
|
||||
}
|
||||
|
||||
public override void WriteLine(string message)
|
||||
{
|
||||
if (ShouldOverrideWriteLine)
|
||||
{
|
||||
_writer.WriteLine(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.WriteLine(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -44,6 +59,40 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
Assert.Contains("FAIL", listener.Output);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Fail_WithoutWriteLineOverride()
|
||||
{
|
||||
var listener = new TestDefaultTraceListener();
|
||||
listener.ShouldOverrideWriteLine = false;
|
||||
listener.Fail("FAIL");
|
||||
Assert.False(listener.Output.Contains("FAIL"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Fail_WithLogFile()
|
||||
{
|
||||
var listener = new TestDefaultTraceListener();
|
||||
string pathToLogFile = GetTestFilePath();
|
||||
|
||||
listener.LogFileName = pathToLogFile;
|
||||
listener.ShouldOverrideWriteLine = false;
|
||||
listener.Fail("FAIL");
|
||||
|
||||
Assert.True(File.Exists(pathToLogFile));
|
||||
Assert.Contains("FAIL", File.ReadAllText(pathToLogFile));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Fail_LogFileDirectoryNotFound()
|
||||
{
|
||||
// Exception should be handled by DefaultTraceListener.WriteLine so no need to assert.
|
||||
var listener = new TestDefaultTraceListener();
|
||||
listener.LogFileName = $"{Guid.NewGuid().ToString("N")}\\LogFile.txt";
|
||||
|
||||
listener.ShouldOverrideWriteLine = false;
|
||||
listener.Fail("FAIL");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TraceEvent()
|
||||
{
|
||||
|
@@ -37,12 +37,17 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
Assert.Equal("", item.Description);
|
||||
}
|
||||
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
static WeakReference PruneMakeRef()
|
||||
{
|
||||
return new WeakReference(new TestSwitch());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PruneTest()
|
||||
{
|
||||
var strongSwitch = new TestSwitch();
|
||||
var weakSwitch = new WeakReference(new TestSwitch());
|
||||
Assert.True(weakSwitch.IsAlive);
|
||||
var weakSwitch = PruneMakeRef();
|
||||
GC.Collect(2);
|
||||
Trace.Refresh();
|
||||
Assert.False(weakSwitch.IsAlive);
|
||||
|
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<ItemGroup>
|
||||
<Project Include="System.Diagnostics.TraceSource.Tests.csproj">
|
||||
<OSGroup>Unix</OSGroup>
|
||||
</Project>
|
||||
<Project Include="System.Diagnostics.TraceSource.Tests.csproj">
|
||||
<OSGroup>Windows_NT</OSGroup>
|
||||
<TestTFMs>netcoreapp;net463</TestTFMs>
|
||||
</Project>
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
|
||||
</Project>
|
@@ -31,6 +31,12 @@
|
||||
<Compile Include="TraceSwitchClassTests.cs" />
|
||||
<Compile Include="TraceTestHelper.cs" />
|
||||
<Compile Include="CorrelationManagerTests.cs" />
|
||||
<Compile Include="$(CommonTestPath)\System\IO\FileCleanupTestBase.cs">
|
||||
<Link>Common\System\IO\FileCleanupTestBase.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonTestPath)\System\PlatformDetection.cs">
|
||||
<Link>Common\tests\System\PlatformDetection.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
||||
|
@@ -19,10 +19,11 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
WriteLine,
|
||||
Flush,
|
||||
Fail,
|
||||
Close
|
||||
//NOTE: update MethodEnumCount if values are added
|
||||
}
|
||||
|
||||
private const int MethodEnumCount = 8;
|
||||
private const int MethodEnumCount = 9;
|
||||
|
||||
public TestTraceListener(bool threadSafe = false)
|
||||
: this(null, threadSafe)
|
||||
@@ -119,5 +120,10 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
{
|
||||
Call(Method.WriteLine);
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
Call(Method.Close);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -2,6 +2,8 @@
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using Xunit;
|
||||
|
||||
namespace System.Diagnostics.TraceSourceTests
|
||||
@@ -10,7 +12,8 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
|
||||
public class TraceClassTests : IDisposable
|
||||
{
|
||||
private const string TestRunnerAssemblyName = "xunit.console.netcore";
|
||||
private readonly string TestRunnerAssemblyName = PlatformDetection.IsFullFramework ?
|
||||
Path.GetFileName(Environment.GetCommandLineArgs()[0]) : Assembly.GetEntryAssembly().GetName().Name;
|
||||
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
@@ -96,13 +99,15 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
var listener = new TestTraceListener();
|
||||
Trace.Listeners.Add(listener);
|
||||
Trace.Close();
|
||||
Assert.Equal(1, listener.GetCallCount(Method.Dispose));
|
||||
Assert.Equal(1, listener.GetCallCount(Method.Close));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Assert1Test()
|
||||
{
|
||||
var listener = new TestTraceListener();
|
||||
// We have to clear the listeners list on Trace since there is a trace listener by default with AssertUiEnabled = true in Desktop and that will pop up an assert window with Trace.Fail
|
||||
Trace.Listeners.Clear();
|
||||
Trace.Listeners.Add(listener);
|
||||
Trace.Assert(true);
|
||||
Assert.Equal(0, listener.GetCallCount(Method.WriteLine));
|
||||
@@ -117,6 +122,8 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
{
|
||||
var listener = new TestTraceListener();
|
||||
var text = new TestTextTraceListener();
|
||||
// We have to clear the listeners list on Trace since there is a trace listener by default with AssertUiEnabled = true in Desktop and that will pop up an assert window with Trace.Fail
|
||||
Trace.Listeners.Clear();
|
||||
Trace.Listeners.Add(listener);
|
||||
Trace.Listeners.Add(text);
|
||||
Trace.Assert(true, "Message");
|
||||
@@ -136,6 +143,8 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
{
|
||||
var listener = new TestTraceListener();
|
||||
var text = new TestTextTraceListener();
|
||||
// We have to clear the listeners list on Trace since there is a trace listener by default with AssertUiEnabled = true in Desktop and that will pop up an assert window with Trace.Fail
|
||||
Trace.Listeners.Clear();
|
||||
Trace.Listeners.Add(listener);
|
||||
Trace.Listeners.Add(text);
|
||||
Trace.Assert(true, "Message", "Detail");
|
||||
@@ -303,6 +312,8 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
public void FailTest()
|
||||
{
|
||||
var listener = new TestTraceListener();
|
||||
// We have to clear the listeners list on Trace since there is a trace listener by default with AssertUiEnabled = true in Desktop and that will pop up an assert window with Trace.Fail
|
||||
Trace.Listeners.Clear();
|
||||
Trace.Listeners.Add(listener);
|
||||
Trace.Fail("Text");
|
||||
Assert.Equal(1, listener.GetCallCount(Method.Fail));
|
||||
@@ -344,6 +355,8 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
public void TraceTest02()
|
||||
{
|
||||
var textTL = new TestTextTraceListener();
|
||||
// We have to clear the listeners list on Trace since there is a trace listener by default with AssertUiEnabled = true in Desktop and that will pop up an assert window with Trace.Fail
|
||||
Trace.Listeners.Clear();
|
||||
Trace.Listeners.Add(textTL);
|
||||
Trace.IndentLevel = 0;
|
||||
Trace.IndentSize = 2;
|
||||
|
@@ -49,10 +49,16 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CallstackTest()
|
||||
public void CallstackTest_NotEmpty()
|
||||
{
|
||||
var cache = new TraceEventCache();
|
||||
Assert.NotEmpty(cache.Callstack);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CallstackTest_ContainsExpectedFrames()
|
||||
{
|
||||
var cache = new TraceEventCache();
|
||||
Assert.Contains("at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)", cache.Callstack);
|
||||
Assert.Contains("at System.Environment.get_StackTrace()", cache.Callstack);
|
||||
}
|
||||
|
||||
|
@@ -233,6 +233,8 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
public void FailTest()
|
||||
{
|
||||
var listener = GetTraceListener();
|
||||
// We have to clear the listeners list on Trace since there is a trace listener by default with AssertUiEnabled = true in Desktop and that will pop up an assert window with Trace.Fail
|
||||
Trace.Listeners.Clear();
|
||||
Trace.Listeners.Add(listener);
|
||||
Trace.Fail("Message");
|
||||
Assert.Equal(1, listener.GetCallCount(Method.Fail));
|
||||
@@ -244,6 +246,8 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
public void Fail2Test()
|
||||
{
|
||||
var listener = GetTraceListener();
|
||||
// We have to clear the listeners list on Trace since there is a trace listener by default with AssertUiEnabled = true in Desktop and that will pop up an assert window with Trace.Fail
|
||||
Trace.Listeners.Clear();
|
||||
Trace.Listeners.Add(listener);
|
||||
Trace.Fail("Message", "Category");
|
||||
Assert.Equal(1, listener.GetCallCount(Method.Fail));
|
||||
|
@@ -57,18 +57,22 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
var listener = new TestTraceListener();
|
||||
trace.Listeners.Add(listener);
|
||||
trace.Close();
|
||||
// NOTE: this assertion fails on .net 4.5
|
||||
// where TraceSource.Close calls TraceListener.Close, not Dispose.
|
||||
Assert.Equal(1, listener.GetCallCount(Method.Dispose));
|
||||
Assert.Equal(1, listener.GetCallCount(Method.Close));
|
||||
// Assert that writing to a closed TraceSource is not an error.
|
||||
trace.TraceEvent(TraceEventType.Critical, 0);
|
||||
}
|
||||
|
||||
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
static WeakReference PruneMakeRef()
|
||||
{
|
||||
return new WeakReference(new TraceSource("TestTraceSource"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PruneTest()
|
||||
{
|
||||
var strongTrace = new TraceSource("TestTraceSource");
|
||||
var traceRef = new WeakReference(new TraceSource("TestTraceSource"));
|
||||
var traceRef = PruneMakeRef();
|
||||
Assert.True(traceRef.IsAlive);
|
||||
GC.Collect(2);
|
||||
Trace.Refresh();
|
||||
@@ -127,8 +131,20 @@ namespace System.Diagnostics.TraceSourceTests
|
||||
[Fact]
|
||||
public void EmptySourceName()
|
||||
{
|
||||
Assert.Throws<ArgumentException>("name", () => new TraceSource(string.Empty));
|
||||
Assert.Throws<ArgumentException>("name", () => new TraceSource(string.Empty, SourceLevels.All));
|
||||
ArgumentException exception1 = Assert.Throws<ArgumentException>(() => new TraceSource(string.Empty));
|
||||
ArgumentException exception2 = Assert.Throws<ArgumentException>(() => new TraceSource(string.Empty, SourceLevels.All));
|
||||
|
||||
// In Desktop in TraceSource.ctor we create the ArgumentException without param name, just with Message = "name", so ParamName is null
|
||||
if (PlatformDetection.IsFullFramework)
|
||||
{
|
||||
Assert.Null(exception1.ParamName);
|
||||
Assert.Null(exception2.ParamName);
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.Equal("name", exception1.ParamName);
|
||||
Assert.Equal("name", exception2.ParamName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Diagnostics.TraceSourceTests
|
||||
{
|
||||
|
Reference in New Issue
Block a user