예제 #1
0
        private bool TryAddReference([NotNull] T4ResolvedPath pathWithMacros)
        {
            var path = AssemblyReferenceResolver.ResolveWithoutCaching(pathWithMacros);

            if (path == null)
            {
                return(false);
            }
            if (MyAssemblyReferences.ContainsKey(path))
            {
                return(false);
            }
            if (MyProjectReferences.ContainsKey(path))
            {
                return(false);
            }
            return(TryAddProjectReference(path) || TryAddAssemblyReference(path));
        }
        private bool TryAddReference(IT4PathWithMacros pathWithMacros)
        {
            var path = AssemblyReferenceResolver.Resolve(pathWithMacros);

            if (path == null)
            {
                return(false);
            }
            if (MyAssemblyReferences.ContainsKey(path))
            {
                return(false);
            }
            if (MyProjectReferences.ContainsKey(path))
            {
                return(false);
            }
            return(TryAddProjectReference(path) || TryAddAssemblyReference(path));
        }