Bari.Core.Build.Cache.CachedBuilder.CanRun C# (CSharp) Method

CanRun() public method

Verifies if the builder is able to run. Can be used to fallback to cached results without getting en error.
public CanRun ( ) : bool
return bool
        public bool CanRun()
        {
            var buildKey = new BuildKey(wrappedBuilder.BuilderType, wrappedBuilder.Uid);

            cache.LockForBuilder(buildKey);
            try
            {
                return wrappedBuilder.CanRun() || cache.ContainsAny(buildKey);
            }
            finally
            {
                cache.UnlockForBuilder(buildKey);
            }
        }