Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions CorrelatorSharp.RestSharp.sln
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2027
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CorrelatorSharp.RestSharp", "CorrelatorSharp.RestSharp\CorrelatorSharp.RestSharp.csproj", "{49000770-7C59-4B43-8B09-DDE00E094780}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7817AA66-B03D-419B-9F75-F03587BBB08D}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CorrelatorSharp.RestSharp", "CorrelatorSharp.RestSharp\CorrelatorSharp.RestSharp.csproj", "{A9F3F9CE-F004-4677-BF09-932601635E73}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{49000770-7C59-4B43-8B09-DDE00E094780}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49000770-7C59-4B43-8B09-DDE00E094780}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49000770-7C59-4B43-8B09-DDE00E094780}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49000770-7C59-4B43-8B09-DDE00E094780}.Release|Any CPU.Build.0 = Release|Any CPU
{A9F3F9CE-F004-4677-BF09-932601635E73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9F3F9CE-F004-4677-BF09-932601635E73}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9F3F9CE-F004-4677-BF09-932601635E73}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9F3F9CE-F004-4677-BF09-932601635E73}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {49B5AA06-A5E0-4E5A-A103-0D8E732B2B4E}
EndGlobalSection
EndGlobal
76 changes: 20 additions & 56 deletions CorrelatorSharp.RestSharp/CorrelatorSharp.RestSharp.csproj
Original file line number Diff line number Diff line change
@@ -1,61 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{49000770-7C59-4B43-8B09-DDE00E094780}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CorrelatorSharp.RestSharp</RootNamespace>
<PackageId>CorrelatorSharp.RestSharp</PackageId>

<Version>1.2.0</Version>

<!--Bump the assembly version only on major releases-->
<AssemblyVersion>1.1.0.0</AssemblyVersion>

<AssemblyName>CorrelatorSharp.RestSharp</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<Description>CorrelatorSharp, a set of tools for adding correlation identifiers for actions performed by users and machine across your applications. Your one stop shop for context-aware logging and diagnostics.</Description>
<Authors>Ivan Zlatev, Jason Dryhurst-Smith</Authors>
<TargetFrameworks>net46;netstandard2.0</TargetFrameworks>
<PackageTags>context;correlation;logging;diagnostics</PackageTags>
<PackageProjectUrl>https://github.com/CorrelatorSharp/CorrelatorSharp</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/CorrelatorSharp/CorrelatorSharp/blob/master/LICENSE.txt</PackageLicenseUrl>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="CorrelatorSharp, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\CorrelatorSharp.1.1.0\lib\net46\CorrelatorSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="RestSharp, Version=105.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.105.2.3\lib\net46\RestSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="IRestClientCorrelationIdHeaderExtensions.cs" />
<Compile Include="IRestRequestCorrelationIdHeaderExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup>
<None Include="CorrelatorSharp.RestSharp.nuspec" />
<None Include="packages.config" />
<PackageReference Include="CorrelatorSharp" Version="[1.4,2)" />
<PackageReference Include="RestSharp" Version="[106.2,107)" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

</Project>
19 changes: 0 additions & 19 deletions CorrelatorSharp.RestSharp/CorrelatorSharp.RestSharp.nuspec

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using RestSharp;
using RestSharp;

namespace CorrelatorSharp.RestSharp
{
Expand All @@ -14,7 +13,8 @@ public static class IRestClientCorrelationIdHeaderExtensions
/// <param name="client">The RestSharp.IRestClient</param>
public static void AddCorrelationHeader(this IRestClient client)
{
client.AddDefaultHeader(Headers.CorrelationId, ActivityScope.Current?.Id ?? Guid.NewGuid().ToString());
var scope = ActivityScope.Current ?? ActivityScope.New(client.BaseUrl.ToString());
client.AddDefaultHeader(Headers.CorrelationId, scope.Id);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using RestSharp;
using RestSharp;

namespace CorrelatorSharp.RestSharp
{
Expand All @@ -11,7 +10,8 @@ public static class IRestRequestCorrelationIdHeaderExtensions
/// <param name="request">The RestSharp.RestRequest</param>
public static void AddCorrelationHeader(this IRestRequest request)
{
request.AddHeader(Headers.CorrelationId, ActivityScope.Current?.Id ?? Guid.NewGuid().ToString());
var scope = ActivityScope.Current ?? ActivityScope.New(request.Resource);
request.AddHeader(Headers.CorrelationId, scope.Id);
}
}
}
37 changes: 0 additions & 37 deletions CorrelatorSharp.RestSharp/Properties/AssemblyInfo.cs

This file was deleted.

5 changes: 0 additions & 5 deletions CorrelatorSharp.RestSharp/packages.config

This file was deleted.

56 changes: 32 additions & 24 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
environment:
release_version: '1.1.0'
release_assembly_version: '1.1.0.0'
version: '$(release_version)+{build}'
os: Visual Studio 2015
configuration: Release
platform: Any CPU
assembly_info:
package_version: '1.2.0'
assembly_version: '1.1.0.0'

version: '$(package_version)+{build}'

image: Visual Studio 2017

dotnet_csproj:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '$(release_assembly_version)'
assembly_file_version: '$(release_assembly_version)'
assembly_informational_version: '$(release_version)'
before_build:
- cmd: >-
nuget restore
file: '**\*.csproj'
version: '$(package_version)'
assembly_version: '$(assembly_version)'

configuration: Release

before_build: dotnet restore

build:
publish_nuget: true
publish_nuget_symbols: true
verbosity: minimal
test:
assemblies: '**\*.Tests.dll'
artifacts:
- path: \*.nupkg

deploy:
- provider: NuGet
api_key:
secure: vZC+uEZj00A+9riSWLXqdnPtGa96W9SQkBy30dS2D5bOUdvteU9vOAP69QLJrY/o
on:
branch: master
- provider: GitHub
description: |
* .NET Standard 2.0+ support.
on:
appveyor_repo_tag: true

release: v$(package_version)
auth_token:
secure: y4HfARa+GScoSgdsOIb7A3L8TV93/wiPBgJENisycZ6yKwBANmPEe1MesK4IC6rm

- provider: NuGet
api_key:
secure: vZC+uEZj00A+9riSWLXqdnPtGa96W9SQkBy30dS2D5bOUdvteU9vOAP69QLJrY/o
on:
appveyor_repo_tag: true