Skip to content
This repository was archived by the owner on Dec 13, 2021. It is now read-only.

Commit 59faa63

Browse files
authored
Merge pull request #240 from umco/develop
Preparing Ditto 0.12.1 release
2 parents 6ec0a65 + 8fe0456 commit 59faa63

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
image: Visual Studio 2017
22

33
# version format
4-
version: 0.12.0.{build}
4+
version: 0.12.1.{build}
55

66
# UMBRACO_PACKAGE_PRERELEASE_SUFFIX if a rtm release build this should be blank, otherwise if empty will default to alpha
77
# example UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta

src/Our.Umbraco.Ditto/ComponentModel/ObjectResolution/AttributedTypeResolver.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,17 @@ private void Initialize(IEnumerable<Type> types, bool inherit = false)
3030
}
3131
}
3232

33-
private static AttributedTypeResolver<TAttribute> _resolver;
34-
3533
/// <summary>
3634
/// A static instance of the attributed type resolver.
3735
/// </summary>
38-
public static AttributedTypeResolver<TAttribute> Current
39-
{
40-
get { return _resolver; }
41-
set { _resolver = value; }
42-
}
36+
public static AttributedTypeResolver<TAttribute> Current { get; set; }
4337

4438
/// <summary>
4539
/// Returns true if the resolver instance is currently available.
4640
/// </summary>
4741
public static bool HasCurrent
4842
{
49-
get { return _resolver != null; }
43+
get { return Current != null; }
5044
}
5145

5246
/// <summary>

src/Our.Umbraco.Ditto/Ditto.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public static bool TryGetTypeAttribute<TAttribute>(Type objectType, out TAttribu
204204
{
205205
if (AttributedTypeResolver<TAttribute>.HasCurrent == false)
206206
{
207-
AttributedTypeResolver<TAttribute>.Current = AttributedTypeResolver<TAttribute>.Create(new[] { objectType });
207+
AttributedTypeResolver<TAttribute>.Current = AttributedTypeResolver<TAttribute>.Create(new[] { objectType }, inherit);
208208
}
209209

210210
return AttributedTypeResolver<TAttribute>.Current.TryGetTypeAttribute(objectType, out attribute, inherit);

0 commit comments

Comments
 (0)