Ejemplo n.º 1
0
        private static Pair <IT4File, IFile> GetFiles([NotNull] IPsiSourceFile sourceFile, DocumentRange documentRange)
        {
            IT4File primaryFile   = null;
            IFile   secondaryFile = null;

            foreach ((IFile file, _) in sourceFile.EnumerateIntersectingPsiFiles(documentRange))
            {
                if (file is IT4File t4File)
                {
                    primaryFile = t4File;
                }
                else
                {
                    secondaryFile = file;
                }
            }

            return(Pair.Of(primaryFile, secondaryFile));
        }
        private static Pair <IT4File, IFile> GetFiles([NotNull] IPsiSourceFile sourceFile, DocumentRange documentRange)
        {
            IT4File primaryFile   = null;
            IFile   secondaryFile = null;

            foreach (Pair <IFile, TreeTextRange> pair in sourceFile.EnumerateIntersectingPsiFiles(documentRange))
            {
                var t4File = pair.First as IT4File;
                if (t4File != null)
                {
                    primaryFile = t4File;
                }
                else
                {
                    secondaryFile = pair.First;
                }
            }

            return(Pair.Of(primaryFile, secondaryFile));
        }