Skip to content

Commit

Permalink
fixed: #119 v4.0.3 packages were targeting only .NET 4.5 and .NET Sta…
Browse files Browse the repository at this point in the history
  • Loading branch information
dadhi committed Apr 25, 2019
1 parent 4c9c0a0 commit fb43768
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.bat
Expand Up @@ -34,7 +34,7 @@ echo:
echo:## Running: TESTS... ##

echo:
dotnet test -c Release
dotnet test -c Release -p:GeneratePackageOnBuild=false

if %ERRORLEVEL% neq 0 goto :error
echo:## Finished: TESTS ##
Expand Down
12 changes: 6 additions & 6 deletions src/DryIoc/Container.cs
Expand Up @@ -6882,7 +6882,7 @@ public void ChangeServiceKey(object serviceKey)
ServiceDetails.Of(details.RequiredServiceType, serviceKey, details.IfUnresolved, details.DefaultValue));
}

/// <summary>Prepends input arguments to existing arguments in request. Prepending is done because
/// <summary>Prepends input arguments to existing arguments in request. It is done because the
/// nested Func/Action input argument has a priority over outer argument.
/// The arguments are provided by Func and Action wrappers, or by `args` parameter in Resolve call.</summary>
public Request WithInputArgs(Expression[] inputArgs) =>
Expand Down Expand Up @@ -7163,7 +7163,7 @@ internal Request GetParentWithExprCache()

// todo: Should we include InputArgs and DecoratedFactoryID and what about flags?
// todo: Should we add and rely on Equals of ServiceInfo and Reuse?
// todo: The equals calculated differently comparing to HashCode, may be we can use FactoryID for for Equals as well?
// todo: The equals calculated differently comparing to HashCode, may be we can use FactoryID for Equals as well?
/// <summary>Compares self properties but not the parents.</summary>
public bool EqualsWithoutParent(Request other) =>
other.ServiceType == ServiceType
Expand Down Expand Up @@ -7662,7 +7662,7 @@ public interface IConcreteFactoryGenerator
public enum FactoryCaching
{ /// Is up to DryIoc to decide,
Default = 0,
/// Prevents DryIoc to sуе `DoNotCache`.
/// Prevents DryIoc to set `DoNotCache`.
PleaseDontSetDoNotCache,
/// If set, the expression won't be cached
DoNotCache
Expand Down Expand Up @@ -8517,6 +8517,7 @@ public Factory GetGeneratedFactory(Request request, bool ifErrorReturnDefault =
? serviceType.GetGenericParamsAndArgs()
: implType.IsGenericParameter ? serviceType.One()
: GetClosedTypeArgsOrNullForOpenGenericType(implType, serviceType, request, ifErrorReturnDefault);

if (closedTypeArgs == null)
return null;

Expand All @@ -8532,7 +8533,7 @@ public Factory GetGeneratedFactory(Request request, bool ifErrorReturnDefault =
var checkMatchingType = implType != null && implType.IsGenericParameter;
var closedFactoryMethod = GetClosedFactoryMethodOrDefault(factoryMethod, closedTypeArgs, request, checkMatchingType);

// may be null only for IfUnresolved.ReturnDefault or check for matching type is failed
// may be null only for `IfUnresolved.ReturnDefault` or if the check for matching type is failed
if (closedFactoryMethod == null)
return null;

Expand All @@ -8543,8 +8544,7 @@ public Factory GetGeneratedFactory(Request request, bool ifErrorReturnDefault =
{
implType = implType.IsGenericParameter
? closedTypeArgs[0]
: Throw.IfThrows<ArgumentException, Type>(
() => implType.MakeGenericType(closedTypeArgs),
: Throw.IfThrows<ArgumentException, Type>(() => implType.MakeGenericType(closedTypeArgs),
!ifErrorReturnDefault && request.IfUnresolved == IfUnresolved.Throw,
Error.NoMatchedGenericParamConstraints, implType, request);
if (implType == null)
Expand Down
2 changes: 1 addition & 1 deletion src/DryIoc/DryIoc.csproj
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks Condition="'$(DevMode)' != 'true'">net35;net40;net45;netstandard1.0;netstandard1.3;netstandard2.0;portable-net45+win8+wpa81+wp8;portable-net40+win8+wpa81+wp8+sl5</TargetFrameworks>

<Product>DryIoc</Product>
<VersionPrefix>4.0.3</VersionPrefix>
<VersionPrefix>4.0.4</VersionPrefix>
<VersionSuffix></VersionSuffix>

<AssemblyName>$(Product)</AssemblyName>
Expand Down
3 changes: 1 addition & 2 deletions src/DryIoc/ImTools.cs
Expand Up @@ -632,8 +632,7 @@ public Ref(T initialValue = default(T))
/// <param name="getNewValue">Delegate to produce new object value from current one passed as parameter.</param>
/// <returns>Returns old object value the same way as <see cref="Interlocked.Exchange(ref int,int)"/></returns>
/// <remarks>Important: <paramref name="getNewValue"/> May be called multiple times to retry update with value concurrently changed by other code.</remarks>
public T Swap(Func<T, T> getNewValue) =>
Ref.Swap(ref _value, getNewValue);
public T Swap(Func<T, T> getNewValue) => Ref.Swap(ref _value, getNewValue);

/// Option without allocation for capturing `a` in closure of `getNewValue`
public T Swap<A>(A a, Func<T, A, T> getNewValue) => Ref.Swap(ref _value, a, getNewValue);
Expand Down
Expand Up @@ -8,7 +8,7 @@ namespace DryIoc.IssuesTests
[TestFixture]
public class GHIssue116_DryIoc_Resolve_with_decorators_goes_wrong_for_parallel_execution
{
[Test, Ignore("fixme")]
[Test][Ignore("fixme")]
public async Task DryIoc_Resolve_parallel_execution()
{
var container = new Container();
Expand Down
@@ -0,0 +1,9 @@
using NUnit.Framework;

namespace DryIoc.IssuesTests
{
[TestFixture]
public class SO_Decorator_not_being_constrained_correctly
{
}
}

0 comments on commit fb43768

Please sign in to comment.