diff options
author | nulltoken <emeric.fermas@gmail.com> | 2011-09-13 17:55:37 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2011-09-14 19:21:43 +0400 |
commit | 5295b22c3f2443a7cf76a27f94c1b799cd78b3df (patch) | |
tree | 7f59f2152d10cab3ad51751f4f85b357090a1c12 /LibGit2Sharp/Reference.cs | |
parent | fef3488bf1603325789f144edd61a276bbc470f0 (diff) |
Replace defered loading implementation of DirectReference with Lazy<T>
Diffstat (limited to 'LibGit2Sharp/Reference.cs')
-rw-r--r-- | LibGit2Sharp/Reference.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LibGit2Sharp/Reference.cs b/LibGit2Sharp/Reference.cs index 8570b9fb..79c33389 100644 --- a/LibGit2Sharp/Reference.cs +++ b/LibGit2Sharp/Reference.cs @@ -57,8 +57,8 @@ namespace LibGit2Sharp var targetId = new ObjectId(oid); targetIdentifier = targetId.Sha; - var targetResolver = new Func<GitObject>(() => repo.Lookup(targetId)); - reference = new DirectReference(targetResolver) { CanonicalName = name, TargetIdentifier = targetIdentifier }; + var targetBuilder = new Lazy<GitObject>(() => repo.Lookup(targetId)); + reference = new DirectReference(targetBuilder) { CanonicalName = name, TargetIdentifier = targetIdentifier }; break; default: |