/// <summary> /// Processes type builder attributes. /// </summary> /// <param name="typeBuilder">A type builder.</param> /// <param name="type">The type to process the attributes for.</param> /// <returns>The type builder instance.</returns> public static ITypeBuilder ProcessAttributes( this ITypeBuilder typeBuilder, Type type) { foreach (var attr in type.GetCustomAttributes()) { /* * if (attr is SwaggerRequestHeaderParameterAttribute) * { * typeBuilder.SetCustomAttribute( * AttributeUtility.BuildAttribute<string, SwaggerRequestHeaderParameterAttribute>( * ((SwaggerRequestHeaderParameterAttribute)attr).Header, * () => AttributeUtility.GetAttributePropertyValues<SwaggerRequestHeaderParameterAttribute>((SwaggerRequestHeaderParameterAttribute)attr, null))); * } * else */ if (attr is ObsoleteAttribute) { typeBuilder.SetCustomAttribute( AttributeUtility.BuildAttribute <ObsoleteAttribute>(null)); } } return(typeBuilder); }