Esempio n. 1
0
        public Installation GetInstallationForPath(string editorPath)
        {
            if (editorPath == null)
            {
                throw new ArgumentException("GetInstallationForPath: Does not allow null editorPath");
            }

            Installation installation;

            if (editorPath == CodeEditor.SystemDefaultPath)
            {
                m_DefaultEditor.TryGetInstallationForPath(editorPath, out installation);
                return(installation);
            }

            foreach (var codeEditor in m_ExternalCodeEditors)
            {
                if (codeEditor.TryGetInstallationForPath(editorPath, out installation))
                {
                    return(installation);
                }
            }
            m_DefaultEditor.TryGetInstallationForPath(editorPath, out installation);
            return(installation);
        }