This repository has been archived by the owner on Feb 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
377c6b5
commit d57a475
Showing
419 changed files
with
114,466 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
======================================================================================== | ||
Microsoft patterns & practices (http://microsoft.com/practices) | ||
SEMANTIC LOGGING APPLICATION BLOCK | ||
======================================================================================== | ||
|
||
Copyright (c) Microsoft. All rights reserved. | ||
Microsoft would like to thank its contributors, a list | ||
of whom are at http://aka.ms/entlib-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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
SEMANTIC LOGGING APPLICATION BLOCK (SLAB) PRE-RELEASE | ||
http://slab.codeplex.com | ||
|
||
This is a pre-release version. It is meant for developers to try out new features or bug fixes ahead of an official release. | ||
We strongly urge you to only use official builds for production. The latest official release is available at http://msdn.microsoft.com/entlib and via the NuGet official feed (http://nuget.org). | ||
|
||
Summary: The Semantic Logging Application Block provides a set of destinations (sinks) to persist application events published using a subclass of the EventSource class from the System.Diagnostics.Tracing namespace. Sinks include Windows Azure table storage, SQL Server databases, and rolling files with several formats and you can extend the block by creating your own custom formatters and sinks. For the those sinks that can store structured data, the block preserves the full structure of the event payload in order to facilitate analyzing or processing the logged data. | ||
|
||
Microsoft patterns & practices | ||
http://microsoft.com/practices |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="4.0" > | ||
|
||
<Import Project="build.targets"/> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- This file builds the Enterprise Library Application Blocks --> | ||
<!-- and runs the unit tests. --> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" | ||
DefaultTargets="Build" | ||
ToolsVersion="4.0" > | ||
|
||
<PropertyGroup> | ||
<Configuration>Release</Configuration> | ||
<Platform>Any CPU</Platform> | ||
|
||
<AssemblyOriginatorKeyFile></AssemblyOriginatorKeyFile> | ||
<SignAssembly>false</SignAssembly> | ||
<DelaySign>false</DelaySign> | ||
|
||
<RunCodeAnalysis>true</RunCodeAnalysis> | ||
|
||
<RepoRoot>$(MSBuildThisFileDirectory)..\</RepoRoot> | ||
<SourceRoot Condition=" '$(SourceRoot)' == '' ">$(RepoRoot)Source\</SourceRoot> | ||
<OutputRoot Condition=" '$(OutputRoot)' == '' ">$(RepoRoot)bin\$(Configuration)\</OutputRoot> | ||
</PropertyGroup> | ||
|
||
<!-- DevEnvDir: Provide a sensible default and add a trailing slash if necessary --> | ||
<PropertyGroup> | ||
<DevEnvDir Condition="$(DevEnvDir) == ''">C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\</DevEnvDir> | ||
<DevEnvDir Condition="!HasTrailingSlash('$(DevEnvDir)')">$(DevEnvDir)\</DevEnvDir> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Solutions Include="$(SourceRoot)**\*.sln"/> | ||
</ItemGroup> | ||
|
||
<Target Name="Rebuild" DependsOnTargets="Clean;Build"/> | ||
|
||
<Target Name="Build" DependsOnTargets="Compile;RunTests;BuildNugetPackages" /> | ||
|
||
<Target Name="Clean" DependsOnTargets="CleanProjects;CleanNugetPackages"/> | ||
|
||
<Target Name="CleanProjects"> | ||
<MSBuild Projects="@(Solutions)" Properties="Configuration=$(Configuration);Platform=$(Platform);AssemblyOriginatorKeyFile=$(AssemblyOriginatorKeyFile);SignAssembly=$(SignAssembly);DelaySign=$(DelaySign);" Targets="Clean"/> | ||
</Target> | ||
|
||
<Target Name="Compile" DependsOnTargets="RestoreNugetPackages"> | ||
<PropertyGroup> | ||
<BuildProperties>$(BuildProperties);Configuration=$(Configuration);Platform=$(Platform)</BuildProperties> | ||
<BuildProperties>$(BuildProperties);AssemblyOriginatorKeyFile=$(AssemblyOriginatorKeyFile);SignAssembly=$(SignAssembly);DelaySign=$(DelaySign);</BuildProperties> | ||
<BuildProperties>$(BuildProperties);RunCodeAnalysis=$(RunCodeAnalysis)</BuildProperties> | ||
</PropertyGroup> | ||
<MSBuild Projects="@(Solutions)" Properties="$(BuildProperties)"/> | ||
</Target> | ||
|
||
<Target Name="RunTests" DependsOnTargets="Compile"> | ||
<PropertyGroup> | ||
<TestProperties>Configuration=$(Configuration)</TestProperties> | ||
<TestProperties Condition=" '$(RunTests)' != '' ">$(TestProperties);RunTests=$(RunTests)</TestProperties> | ||
<TestProperties Condition=" '$(DevEnvDir)' != '' ">$(TestProperties);DevEnvDir=$(DevEnvDir)</TestProperties> | ||
<TestProperties Condition=" '$(TestAssembliesToExclude)' != '' ">$(TestProperties);TestAssembliesToExclude=$(TestAssembliesToExclude)</TestProperties> | ||
<TestProperties Condition=" '$(MinimumCoverageRequired)' != '' ">$(TestProperties);MinimumCoverageRequired=$(MinimumCoverageRequired)</TestProperties> | ||
<TestProperties Condition=" '$(GetCoverageInformation)' != '' ">$(TestProperties);GetCoverageInformation=$(GetCoverageInformation)</TestProperties> | ||
<TestProperties Condition=" '$(GetMstestCoverage)' != '' ">$(TestProperties);GetMstestCoverage=$(GetMstestCoverage)</TestProperties> | ||
</PropertyGroup> | ||
|
||
<MSBuild Projects="test.targets" Targets="RunTests" Properties="$(TestProperties)"/> | ||
</Target> | ||
|
||
<Import Project="nuget.targets"/> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- This file builds the Enterprise Library Application Blocks --> | ||
<!-- and runs the unit tests. --> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" | ||
ToolsVersion="4.0" > | ||
|
||
<PropertyGroup> | ||
<NuGetExeDirectory>$(MSBuildThisFileDirectory)bin\</NuGetExeDirectory> | ||
<NuGetExePath>$(NuGetExeDirectory)nuget.exe</NuGetExePath> | ||
<BuildNugetPackages>true</BuildNugetPackages> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<NuSpecFiles Include="$(SourceRoot)**\*.nuspec" Exclude="$(SourceRoot)packages\**\*.nuspec"/> | ||
</ItemGroup> | ||
|
||
<Target Name="RestoreNugetPackages" DependsOnTargets="_DownloadNuGet"> | ||
<Exec Command=""$(NuGetExePath)" restore "%(Solutions.FullPath)" -NonInteractive"/> | ||
<Exec Command=""$(NuGetExePath)" restore packages.config -PackagesDirectory packages -NonInteractive"/> | ||
</Target> | ||
|
||
<Target Name="BuildNugetPackages" DependsOnTargets="_DownloadNuget;_GetPackageVersions;_BuildPackageVersionTokens" | ||
Condition=" '$(BuildNugetPackages)' == 'true' " | ||
Inputs="@(NuSpecFiles)" Outputs="%(NuSpecFiles.Identity)-runalways"> | ||
|
||
<PropertyGroup> | ||
<SourceRootFullPath>$([System.IO.Path]::GetFullPath('$(SourceRoot)'))</SourceRootFullPath> | ||
<PackageBasePath>$(SourceRootFullPath.TrimEnd('\'))</PackageBasePath> | ||
<PackageOutputDir Condition=" '$(PackageOutputDir)' == '' ">$([System.IO.Path]::GetFullPath('$(RepoRoot)bin\$(Configuration)\Nuget'))</PackageOutputDir> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<_NuGetPackTarget>$([System.IO.Path]::GetDirectoryName("%(NuSpecFiles.FullPath)"))\%(NuSpecFiles.Filename).csproj</_NuGetPackTarget> | ||
<_NuGetPackTarget Condition=" !Exists('$(_NuGetPackTarget)') ">%(NuSpecFiles.FullPath)</_NuGetPackTarget> | ||
</PropertyGroup> | ||
|
||
<MakeDir Directories="$(PackageOutputDir)" Condition="!Exists($(PackageOutputDir))"/> | ||
|
||
<Exec Command=""$(NuGetExePath)" pack "$(_NuGetPackTarget)" -Properties Configuration=$(Configuration);@(_VersionTokens) -NonInteractive -OutputDirectory "$(PackageOutputDir)" -Symbols -BasePath "$(PackageBasePath)"" | ||
IgnoreStandardErrorWarningFormat="true"/> | ||
|
||
</Target> | ||
|
||
<Target Name="CleanNugetPackages"> | ||
|
||
<PropertyGroup> | ||
<PackageOutputDir Condition=" '$(PackageOutputDir)' == '' ">$([System.IO.Path]::GetFullPath('$(RepoRoot)bin\$(Configuration)\Nuget'))</PackageOutputDir> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Packages Include="$(PackageOutputDir)\*.nupkg"/> | ||
</ItemGroup> | ||
|
||
<Message Text="@(Packages)"/> | ||
<Delete Files="@(Packages)"/> | ||
|
||
</Target> | ||
|
||
<Target Name="_GetPackageVersions"> | ||
|
||
<ItemGroup> | ||
<OutputBinaries Include="$(OutputRoot)*.dll;$(OutputRoot)*.exe"/> | ||
</ItemGroup> | ||
|
||
<GetAssemblyVersion VersionProviderPaths="@(OutputBinaries)"> | ||
<Output TaskParameter="Versions" ItemName="AssemblyVersions"/> | ||
</GetAssemblyVersion> | ||
|
||
<Message Importance="high" Text="Versions found: @(AssemblyVersions)"/> | ||
|
||
</Target> | ||
|
||
<Target Name="_BuildPackageVersionTokens" Inputs="@(AssemblyVersions)" Outputs="%(Identity)"> | ||
<!-- Using target batching to be able to do transformations on the metadata values --> | ||
<PropertyGroup> | ||
<AssemblyToken>%(AssemblyVersions.Identity)</AssemblyToken> | ||
<AssemblyToken>$(AssemblyToken.Replace(".", "_"))</AssemblyToken> | ||
<AssemblyToken>$(AssemblyToken.Replace("-", "_"))</AssemblyToken> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<_VersionTokens Include="$(VersionTokens)$(AssemblyToken)_Version=%(AssemblyVersions.InformationalVersion)"/> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Target Name="_DownloadNuGet" Condition="!Exists('$(NuGetExePath)')"> | ||
<MakeDir Directories="$(NuGetExeDirectory)" Condition="!Exists('$(NuGetExeDirectory)')"/> | ||
<DownloadNuGet OutputFilename="$(NuGetExePath)" /> | ||
</Target> | ||
|
||
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll"> | ||
<ParameterGroup> | ||
<OutputFilename ParameterType="System.String" Required="true" /> | ||
</ParameterGroup> | ||
<Task> | ||
<Reference Include="System.Core" /> | ||
<Using Namespace="System" /> | ||
<Using Namespace="System.IO" /> | ||
<Using Namespace="System.Net" /> | ||
<Using Namespace="Microsoft.Build.Framework" /> | ||
<Using Namespace="Microsoft.Build.Utilities" /> | ||
<Code Type="Fragment" Language="cs"> | ||
<![CDATA[ | ||
try | ||
{ | ||
OutputFilename = Path.GetFullPath(OutputFilename); | ||
Log.LogMessage("Downloading latest version of NuGet.exe to " + OutputFilename); | ||
WebClient webClient = new WebClient(); | ||
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename); | ||
return true; | ||
} | ||
catch (Exception ex) { | ||
Log.LogErrorFromException(ex); | ||
return false; | ||
} | ||
]]> | ||
</Code> | ||
</Task> | ||
</UsingTask> | ||
|
||
<UsingTask TaskName="GetAssemblyVersion" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll"> | ||
<ParameterGroup> | ||
<VersionProviderPaths ParameterType="Microsoft.Build.Framework.ITaskItem[]" Required="true" /> | ||
<Versions ParameterType="Microsoft.Build.Framework.ITaskItem[]" Output="true" /> | ||
</ParameterGroup> | ||
<Task> | ||
<Using Namespace="System" /> | ||
<Using Namespace="System.Reflection" /> | ||
<Using Namespace="Microsoft.Build.Framework" /> | ||
<Using Namespace="Microsoft.Build.Utilities" /> | ||
<Code Type="Fragment" Language="cs"> | ||
<![CDATA[ | ||
var versions = new List<ITaskItem>(); | ||
try | ||
{ | ||
foreach(var versionProviderPath in VersionProviderPaths) | ||
{ | ||
var assembly = Assembly.LoadFrom(versionProviderPath.GetMetadata("Fullpath")); | ||
var assemblyName = assembly.GetName(); | ||
var version = assemblyName.Version; | ||
var fileVersionAttribute = assembly.GetCustomAttribute<AssemblyFileVersionAttribute>(); | ||
var informationalVersionAttribute = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>(); | ||
var item = new TaskItem(assemblyName.Name); | ||
item.SetMetadata("AssemblyVersion", version.ToString()); | ||
item.SetMetadata("FileVersion", fileVersionAttribute != null ? fileVersionAttribute.Version : string.Empty); | ||
item.SetMetadata("InformationalVersion", informationalVersionAttribute != null ? informationalVersionAttribute.InformationalVersion : string.Empty); | ||
versions.Add(item); | ||
} | ||
Versions = versions.ToArray(); | ||
return true; | ||
} | ||
catch (Exception ex) { | ||
Log.LogErrorFromException(ex); | ||
return false; | ||
} | ||
]]> | ||
</Code> | ||
</Task> | ||
</UsingTask> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="OpenCover" version="4.5.1923" /> | ||
<package id="ReportGenerator" version="1.9.0.0" /> | ||
</packages> |
Oops, something went wrong.