Exemplo n.º 1
0
        public ScalarContext(ITracer tracer, PhysicalFileSystem fileSystem, ScalarEnlistment enlistment)
        {
            this.Tracer     = tracer;
            this.FileSystem = fileSystem;
            this.Enlistment = enlistment;

            this.Unattended = ScalarEnlistment.IsUnattended(this.Tracer);
        }
Exemplo n.º 2
0
        public static bool TryGetDefaultLocalCacheRoot(ScalarEnlistment enlistment, out string localCacheRoot, out string localCacheRootError)
        {
            if (ScalarEnlistment.IsUnattended(tracer: null))
            {
                localCacheRoot      = Path.Combine(enlistment.EnlistmentRoot, ScalarConstants.DefaultScalarCacheFolderName);
                localCacheRootError = null;
                return(true);
            }

            return(ScalarPlatform.Instance.TryGetDefaultLocalCacheRoot(enlistment.EnlistmentRoot, out localCacheRoot, out localCacheRootError));
        }