ServiceStack/ServiceStack.Text — pull request #433 by Tyst (2014-10-21 16:35:40+00:00)
Title: Inconsistencies in Attribute Extensions

Hi Demis,

I've found a couple of inconsistencies with the attribute extensions when using them with attributes that inherit other attributes.

I've quickly created a failing test in my first commit, with an explanation showing that `GetCustomAttributes(typeof(FooAttribute), true)` will also enumerate `BarAttribute` if `BarAttribute : FooAttribute`

It also shows that `type.GetCustomAttributes(true).Union(type.GetRuntimeAttributes())` results in the Union losing some of the Attributes that `GetCustomAttributes(true)` actually returned, when dealing with `BarAttribute`

Changes:
- Changed `Union()` to `Concat()`
- Made comparisons like `x => x.GetType() == attrType` to `attrType.IsInstanceOfType()` so that runtime attributes obey inheritence hierarchies

Let me know if you'd like to see more formal tests, otherwise I'll drop out the explanation commit so you can merge. Thinking these changes should be pretty harmless.