This repository was archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Target netstandard 1.3 #51
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
afbb43f
Add an editorconfig file to maintain the current tab indentation sett…
spewu 0355b05
Add ncrunch stuff to gitignore
spewu 633becd
Change Analytics to target netstandard 1.6
spewu 270c284
Cleaned usings, as System.Runtime.Serialization.Json is not used and …
spewu fb12486
Changed Encoding.Default to Encoding.GetEncoding(0), as that is the w…
spewu 31345dd
Format file to align on tabs and brace positioning
spewu ca07e74
Make client readonly
spewu c529e97
Rewrite BlockingRequestHandler to use HttpClient instead of HttpWebRe…
spewu 0f178f9
Deleted some classes that are not used
spewu 2a306c4
In the async flush handler that runs on its own thread, make sure to …
spewu e437edf
In the blocking flush handler use async/await - so change it to retur…
spewu 65dcc7e
Make all the client methods async
spewu bdb0a9f
Retarget towards netstandard 1.3
spewu 6589636
Change the Test project to a netcoreapp library
spewu 50373dc
Format files to align on tab indentation and brace allignment
spewu 8275627
Updated Actions to be async
spewu 0ec746a
Updated ActionTests to be async
spewu 97a027b
Updated FlushTests to be async
spewu a606b27
Add note in History.md about new changes
spewu 9a34a6c
Content type encoding should be specified on the StringContent object
spewu c46113b
Make client operations syncronous
spewu 2e7d43d
Update history
spewu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
root = true | ||
|
||
[*.cs] | ||
charset = utf-8 | ||
indent_style = tab |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
@@ -1,96 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.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>{E79E6240-4954-41D0-BCE4-573B800EF006}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Segment</RootNamespace> | ||
<AssemblyName>Analytics.NET</AssemblyName> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<TargetFramework>netstandard1.3</TargetFramework> | ||
</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' "> | ||
<Optimize>True</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net35\Newtonsoft.Json.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Runtime.Serialization" /> | ||
<Reference Include="System.ServiceModel.Web" /> | ||
<Reference Include="System.Web" /> | ||
<Reference Include="System.Web.Extensions" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Client.cs" /> | ||
<Compile Include="Defaults.cs" /> | ||
<Compile Include="Exception\BadParameter.cs" /> | ||
<Compile Include="Exception\NotInitializedException.cs" /> | ||
<Compile Include="Logger.cs" /> | ||
<Compile Include="Model\BaseAction.cs" /> | ||
<Compile Include="Model\Batch.cs" /> | ||
<Compile Include="Model\Context.cs" /> | ||
<Compile Include="Model\Identify.cs" /> | ||
<Compile Include="Model\Properties.cs" /> | ||
<Compile Include="Model\Traits.cs" /> | ||
<Compile Include="Request\IRequestHandler.cs" /> | ||
<Compile Include="Analytics.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Stats\Statistics.cs" /> | ||
<Compile Include="Model\Providers.cs" /> | ||
<Compile Include="Model\Alias.cs" /> | ||
<Compile Include="Constants.cs" /> | ||
<Compile Include="Flush\IFlushHandler.cs" /> | ||
<Compile Include="Flush\AsyncFlushHandler.cs" /> | ||
<Compile Include="Flush\BlockingQueue.cs" /> | ||
<Compile Include="Request\BlockingRequestHandler.cs" /> | ||
<Compile Include="Flush\BlockingFlushHandler.cs" /> | ||
<Compile Include="Flush\IBatchFactory.cs" /> | ||
<Compile Include="Flush\SimpleBatchFactory.cs" /> | ||
<Compile Include="Model\Options.cs" /> | ||
<Compile Include="Model\Dict.cs" /> | ||
<Compile Include="Config.cs" /> | ||
<Compile Include="Model\Group.cs" /> | ||
<Compile Include="Model\Page.cs" /> | ||
<Compile Include="Model\Screen.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Model\Track.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="History.md" /> | ||
<None Include="Analytics.nuspec" /> | ||
<None Include="packages.config" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" /> | ||
<PackageReference Include="System.Threading.Thread" Version="4.3.0" /> | ||
</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> | ||
--> | ||
<ItemGroup /> | ||
|
||
</Project> |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be left
void
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends on which layer in the application you want to switch from async to sync. In my pull request I suggest to do that switch in the topmost layer (the client). That makes is easy to add async overloads of the client methods if you want that in the future (which I think would be a good idea).
However, we can also choose to do that in the lower layer, e.g. where we are making the http requests. That means we can keep the rest of the layers without modification.
I don't see the harm in changing this method to async, as it is an internal class - so I don't consider this a breaking change.
In any case, the decision is yours. Let me know if you need me to modify it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot this was internal. This looks good!