Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/dev-pomma89'
Browse files Browse the repository at this point in the history
  • Loading branch information
pomma89 committed Aug 17, 2017
2 parents 3f658e5 + 1df56f4 commit 4f7d3ea
Show file tree
Hide file tree
Showing 25 changed files with 174 additions and 222 deletions.
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: csharp
dotnet: 2.0.0
dist: trusty

addons:
apt:
sources:
- sourceline: 'deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main'
key_url: 'https://packages.microsoft.com/keys/microsoft.asc'
packages:
- dotnet-hostfxr-1.0.1
- dotnet-sharedframework-microsoft.netcore.app-1.1.2

before_script:
- chmod a+x ./build.sh
script:
- ./build.sh
37 changes: 22 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,61 @@
# Changelog for CodeProject.ObjectPool #

### v3.1.1 (2017-07-03) ###
### v3.2.0 (2017-08-16)

* Added support for .NET Standard 2.0.
* System.Timer does not seem to be available on .NET Standard 1.0 anymore.
* Added support for .NET Standard 1.2, since it is the minimum version which implements System.Timer.
* Dropped support for .NET 3.5.

### v3.1.1 (2017-07-03)

* Object pool now supports an async eviction job (PR #6 by @uliian).
* Timed object pool is now backed by the new eviction system.
* Timed object pool is also available on .NET Standard 1.0 (PR #6 by @uliian).

### v3.1.0 (2017-06-24) ###
### v3.1.0 (2017-06-24)

* Removed dependency on Thrower.
* Pooled objects can now specify a validation step (PR #4 by @uliian).
* Removed CannotResetStateException class, not needed with new validation step.

### v3.0.3 (2017-04-08) ###
### v3.0.3 (2017-04-08)

* Added a timed object pool (issue #1).
* OnReleaseResources and OnResetState are now simple actions on PooledObject.

### v3.0.2 (2017-04-02) ###
### v3.0.2 (2017-04-02)

* Moved core pool buffer into dedicated class: Core.PooledObjectBuffer.

### v3.0.1 (2017-03-30) ###
### v3.0.1 (2017-03-30)

* Breaking change - Pool does not handle minimum capacity anymore.
* Breaking change - Pooled object ID, state, handle have been moved to PooledObjectInfo property.
* Breaking change - Removed CreatedAt property from PooledMemoryStream and PooledStringBuilder.
* Breaking change - ID property on PooledMemoryStream and PooledStringBuilder is now an int instead of a GUID.
* Default maximum capacity is now 16.

### v2.2.4 (2017-03-05) ###
### v2.2.4 (2017-03-05)

* Fixed a bug which could produce closed pooled memory streams.
* Converted the project to .NET Core format.

### v2.2.2 (2017-01-08) ###
### v2.2.2 (2017-01-08)

* Updated Thrower to v4.0.6.
* Added unit tests for Portable and .NET Standard 1.1/1.3.

### v2.2.1 (2016-12-17) ###
### v2.2.1 (2016-12-17)

* Updated Thrower to v4.
* Fixed some mistakes inside nuspec dependencies.

### v2.1.1 (2016-09-18) ###
### v2.1.1 (2016-09-18)

* BREAKING CHANGE: Removed a feature added by mistake in v2.1.0.

### v2.1.0 (2016-09-18) ###
### v2.1.0 (2016-09-18)

* Changed default min and max size for MemoryStreamPool: 4KB min, 512KB max.
* Changed default min and max size for StringBuilderPool: 4K char min, 512K char max.
Expand All @@ -58,28 +65,28 @@
* ObjectPool did not respect minimum pool size bound. Now it does.
* When min or max capacity of specialized pools is changed, pool is cleared, if necessary.

### v2.0.5 (2016-08-23) ###
### v2.0.5 (2016-08-23)

* Fixed wrong name in an exception string.
* Added Id and CreatedAt properties to PooledMemoryStream and PooledStringBuilder.

### v2.0.4 (2016-08-20) ###
### v2.0.4 (2016-08-20)

* Fixes for new MemoryStream pool.

### v2.0.3 (2016-08-20) ###
### v2.0.3 (2016-08-20)

* Added a MemoryStream pool in the "Specialized" namespace.

### v2.0.2 (2016-08-20) ###
### v2.0.2 (2016-08-20)

* Added LibLog to .NET 4.x projects.
* Added a DLL compiled for .NET 3.5.
* Added a DLL compiled for .NET Standard 1.3.
* Performance have been improved by 30%.
* Added a StringBuilder pool in the "Specialized" namespace.

### v2.0.1 (2016-08-07) ###
### v2.0.1 (2016-08-07)

* Library for .NET Standard 1.1.
* Updated NUnit to 3.x branch.
7 changes: 5 additions & 2 deletions ObjectPool.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26403.0
VisualStudioVersion = 15.0.26730.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{4C2B7C0C-7CDD-4125-B57A-88E168D24190}"
ProjectSection(SolutionItems) = preProject
.gitattributes = .gitattributes
.gitignore = .gitignore
appveyor.yml = appveyor.yml
.travis.yml = .travis.yml
build.cake = build.cake
CHANGELOG.md = CHANGELOG.md
LICENSE.htm = LICENSE.htm
Expand Down Expand Up @@ -76,4 +76,7 @@ Global
{362C2E4A-3EE7-41BE-A233-70649B258439} = {69DFB95F-7861-4E90-ABC1-33F75FBE67AF}
{DA3DC42C-80E7-4559-9737-F13BE6F4565C} = {4C2B7C0C-7CDD-4125-B57A-88E168D24190}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4C81698D-E18E-4669-B9D3-7FEFA57C794D}
EndGlobalSection
EndGlobal
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

## Summary ##

* Latest release version: `v3.1.1`
* Build status on [AppVeyor](https://ci.appveyor.com): [![Build status](https://ci.appveyor.com/api/projects/status/r4qnqaqj9ri6cicn?svg=true)](https://ci.appveyor.com/project/pomma89/objectpool)
* Latest release version: `v3.2.0`
* Build status on [Travis CI](https://travis-ci.org): [![Build Status](https://travis-ci.org/pomma89/ObjectPool.svg?branch=master)](https://travis-ci.org/pomma89/ObjectPool)
* [Doxygen](http://www.stack.nl/~dimitri/doxygen/index.html) documentation:
+ [HTML](http://pomma89.altervista.org/objectpool/doc/html/index.html)
+ [CHM](http://pomma89.altervista.org/objectpool/doc/refman.chm)
Expand Down
52 changes: 0 additions & 52 deletions appveyor.yml

This file was deleted.

45 changes: 29 additions & 16 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#tool nuget:?package=NUnit.ConsoleRunner&version=3.6.1
#tool nuget:?package=NUnit.ConsoleRunner&version=3.7.0

//////////////////////////////////////////////////////////////////////
// ARGUMENTS
Expand All @@ -10,8 +10,9 @@ var target = Argument("target", "Default");
// PREPARATION
//////////////////////////////////////////////////////////////////////

var solutionFile = "./ObjectPool.sln";
var artifactsDir = "./artifacts";
private string SolutionFile() { return "./ObjectPool.sln"; }
private string ArtifactsDir() { return "./artifacts"; }
private string MSBuildLinuxPath() { return @"/usr/lib/mono/msbuild/15.0/bin/MSBuild.dll"; }

//////////////////////////////////////////////////////////////////////
// TASKS
Expand All @@ -20,7 +21,7 @@ var artifactsDir = "./artifacts";
Task("Clean")
.Does(() =>
{
CleanDirectory(artifactsDir);
CleanDirectory(ArtifactsDir());
});

Task("Restore")
Expand Down Expand Up @@ -84,19 +85,22 @@ RunTarget(target);

private void Build(string cfg)
{
//foreach(var project in GetFiles("./**/*.csproj"))
//DotNetCoreBuild(SolutionFile(), new DotNetCoreBuildSettings
//{
// DotNetCoreBuild(project.GetDirectory().FullPath, new DotNetCoreBuildSettings
// {
// Configuration = cfg,
// NoIncremental = true
// });
//}

MSBuild(solutionFile, settings =>
// Configuration = cfg,
// NoIncremental = true
//});

MSBuild(SolutionFile(), settings =>
{
settings.SetConfiguration(cfg);
settings.SetMaxCpuCount(0);
settings.SetVerbosity(Verbosity.Quiet);
if (!IsRunningOnWindows())
{
// Hack for Linux bug - Missing MSBuild path.
settings.ToolPath = new FilePath(MSBuildLinuxPath());
}
});
}

Expand Down Expand Up @@ -131,19 +135,28 @@ private void Pack(string cfg)
//DotNetCorePack(project.FullPath, new DotNetCorePackSettings
//{
// Configuration = cfg,
// OutputDirectory = artifactsDir,
// NoBuild = true
// OutputDirectory = ArtifactsDir(),
// NoBuild = true,
// IncludeSource = true,
// IncludeSymbols = true
//});

MSBuild(project, settings =>
{
settings.SetConfiguration(cfg);
settings.SetMaxCpuCount(0);
settings.SetVerbosity(Verbosity.Quiet);
settings.WithTarget("pack");
settings.WithProperty("IncludeSource", new[] { "true" });
settings.WithProperty("IncludeSymbols", new[] { "true" });
if (!IsRunningOnWindows())
{
// Hack for Linux bug - Missing MSBuild path.
settings.ToolPath = new FilePath(MSBuildLinuxPath());
}
});

var packDir = project.GetDirectory().Combine("bin").Combine(cfg);
MoveFiles(GetFiles(packDir + "/*.nupkg"), artifactsDir);
MoveFiles(GetFiles(packDir + "/*.nupkg"), ArtifactsDir());
});
}
6 changes: 1 addition & 5 deletions src/CodeProject.ObjectPool/App_Packages/LibLog.4.2/LibLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
// Define LIBLOG_PROVIDERS_ONLY if your library provides its own logging API and you just want to use
// the LibLog providers internally to provide built in support for popular logging frameworks.

#if !NET35

#pragma warning disable 1591

using System.Diagnostics.CodeAnalysis;
Expand Down Expand Up @@ -2348,6 +2346,4 @@ public void Dispose()
}
}
}
}

#endif
}
26 changes: 16 additions & 10 deletions src/CodeProject.ObjectPool/CodeProject.ObjectPool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<PropertyGroup>
<AssemblyName>CodeProject.ObjectPool</AssemblyName>
<AssemblyTitle>Generic and concurrent Object Pool</AssemblyTitle>
<VersionPrefix>3.1.1</VersionPrefix>
<TargetFrameworks>netstandard1.0;netstandard1.3;net35;net40;net45</TargetFrameworks>
<VersionPrefix>3.2.0</VersionPrefix>
<TargetFrameworks>netstandard1.0;netstandard1.2;netstandard1.3;netstandard2.0;net40;net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyOriginatorKeyFile>../../pomma89.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
Expand Down Expand Up @@ -35,30 +35,36 @@

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.0' ">
<DefineConstants>$(DefineConstants);NETSTD10;LIBLOG_PORTABLE</DefineConstants>
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.0' ">
<PackageReference Include="Microsoft.CSharp" Version="4.3.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.4.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.2' ">
<DefineConstants>$(DefineConstants);NETSTD12;LIBLOG_PORTABLE</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.2' ">
<PackageReference Include="Microsoft.CSharp" Version="4.4.0" />
<PackageReference Include="System.Threading.Timer" Version="4.3.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<DefineConstants>$(DefineConstants);NETSTD13;LIBLOG_PORTABLE</DefineConstants>
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PackageReference Include="Microsoft.CSharp" Version="4.3.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.4.0" />
<PackageReference Include="System.Collections.NonGeneric" Version="4.3.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net35' ">
<DefineConstants>$(DefineConstants);NET35;HAS_SERIALIZABLE</DefineConstants>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<DefineConstants>$(DefineConstants);NETSTD20</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
<Reference Include="System" />
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.CSharp" Version="4.4.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net40' ">
Expand Down
2 changes: 1 addition & 1 deletion src/CodeProject.ObjectPool/Core/PooledObjectBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace CodeProject.ObjectPool.Core
public sealed class PooledObjectBuffer<T> : IEnumerable<T>
where T : PooledObject
{
#if (NET35 || NET40)
#if NET40
private const MethodImplOptions TryInline = default(MethodImplOptions);
#else
private const MethodImplOptions TryInline = MethodImplOptions.AggressiveInlining;
Expand Down
Loading

0 comments on commit 4f7d3ea

Please sign in to comment.