Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SubmoduleLazyGroup.cs « Core « LibGit2Sharp - github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0591574d46924f4bf98e51a848513b62d6fd2098 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using LibGit2Sharp.Core.Handles;

namespace LibGit2Sharp.Core
{
    internal class SubmoduleLazyGroup : LazyGroup<SubmoduleSafeHandle>
    {
        private readonly string name;

        public SubmoduleLazyGroup(Repository repo, string name)
            : base(repo)
        {
            this.name = name;
        }

        protected override void EvaluateInternal(Action<SubmoduleSafeHandle> evaluator)
        {
            repo.Submodules.Lookup(name, handle =>
                                             {
                                                 evaluator(handle);
                                                 return default(object);
                                             }, true);
        }
    }
}