Balakin.VSOutputEnhancer.Tests.UnitTests.ClassificationFormatTests.GetAllExportedFormats C# (CSharp) Method

GetAllExportedFormats() private method

private GetAllExportedFormats ( ) : IEnumerable
return IEnumerable
        private IEnumerable<Type> GetAllExportedFormats()
        {
            var formatBaseType = typeof(ClassificationFormatDefinition);

            var assembly = typeof(StyleManager).Assembly;
            var formatTypes = assembly.GetTypes().Where(t => t.IsSubclassOf(formatBaseType));
            formatTypes = formatTypes.Where(t => t.GetCustomAttribute<ExportAttribute>() != null);
            return formatTypes;
        }