Example #1
0
        public override long FileLength(string name)
        {
            lock (this)
            {
#pragma warning disable 612, 618
                if (cache.FileExists(name))
#pragma warning restore 612, 618
                {
                    return(cache.FileLength(name));
                }
                else
                {
                    return(@delegate.FileLength(name));
                }
            }
        }
Example #2
0
        public override long FileLength(string name)
        {
            UninterruptableMonitor.Enter(this);
            try
            {
#pragma warning disable 612, 618
                if (cache.FileExists(name))
#pragma warning restore 612, 618
                {
                    return(cache.FileLength(name));
                }
                else
                {
                    return(@delegate.FileLength(name));
                }
            }
            finally
            {
                UninterruptableMonitor.Exit(this);
            }
        }