/// <summary>
        /// Gets the ICSharpFile for the given element.
        /// </summary>
        /// <param name="element">
        /// The element to use.
        /// </param>
        /// <returns>
        /// An ICSharpFile for the element.
        /// </returns>
        public static ICSharpFile GetCSharpFile(IElement element)
        {
            if (element == null)
            {
                return null;
            }

            PsiManager psiManager = PsiManager.GetInstance(element.GetSolution());

            if (psiManager == null)
            {
                return null;
            }

            IProjectFile projectFile = element.GetProjectFile();

            return projectFile == null ? null : psiManager.GetPsiFile(projectFile, PsiLanguageType.GetByProjectFile(projectFile)) as ICSharpFile;
        }