CClash.CompilerCacheBase.CompileOrCache C# (CSharp) Method

CompileOrCache() public method

public CompileOrCache ( ICompiler comp, IEnumerable args ) : int
comp ICompiler
args IEnumerable
return int
        public virtual int CompileOrCache( ICompiler comp, IEnumerable<string> args)
        {
            if (IsSupported(comp, args))
            {
                args = comp.CompileArgs;
                var hc = DeriveHashKey(comp, args);
                if (hc.Result == DataHashResult.Ok)
                {
                    CacheManifest hm;
                    if (CheckCache(comp, args ,hc, out hm))
                    {
                        Logging.Hit(hc.Hash, comp.WorkingDirectory, comp.ObjectTarget);
                        return OnCacheHitLocked(comp, hc, hm);
                    }
                    else
                    {   // miss, try build
                        return OnCacheMissLocked(comp, hc, args, hm);
                    }
                }
            }
            else
            {
                Stats.LockStatsCall(() => Stats.CacheUnsupported++);
            }

            if (comp.ResponseFile != null)
            {
                if (File.Exists(comp.ResponseFile))
                {
                    //var resp = File.ReadAllText(comp.ResponseFile);
                }
            }

            return CompileOnly(comp, args);
        }