Ejemplo n.º 1
0
        public ISettingsProvider <TData>?GetSettingsProvider <TData>(string fileName)
        {
            if (typeof(TData) == typeof(AnalyzerSetting))
            {
                return((ISettingsProvider <TData>)_analyzerProvider.GetForFile(fileName));
            }

            if (typeof(TData) == typeof(FormattingSetting))
            {
                return((ISettingsProvider <TData>)_formattingProvider.GetForFile(fileName));
            }

            if (typeof(TData) == typeof(CodeStyleSetting))
            {
                return((ISettingsProvider <TData>)_codeStyleProvider.GetForFile(fileName));
            }

            return(null);
        }
Ejemplo n.º 2
0
        public ISettingsProvider <TData>?GetSettingsProvider <TData>(string fileName)
        {
            if (typeof(TData) == typeof(AnalyzerSetting))
            {
                return((ISettingsProvider <TData>)_analyzerProvider.GetForFile(fileName));
            }

            if (typeof(TData) == typeof(WhitespaceSetting))
            {
                return((ISettingsProvider <TData>)_whitespaceProvider.GetForFile(fileName));
            }

            if (typeof(TData) == typeof(NamingStyleSetting))
            {
                return((ISettingsProvider <TData>)_namingStyleProvider.GetForFile(fileName));
            }

            if (typeof(TData) == typeof(CodeStyleSetting))
            {
                return((ISettingsProvider <TData>)_codeStyleProvider.GetForFile(fileName));
            }

            return(null);
        }