public static bool FilterOnMetadata(Type t, MyClassType classType) { var metadataAttribute = (MyMetadataAttribute)t.GetCustomAttributes(true) .SingleOrDefault(at => at is MyMetadataAttribute); if (metadataAttribute != null) { return(metadataAttribute.Type == classType); } return(false); }
protected override void OnSetUp() { expectedInput = new MyClassType(); expectedInputIndex = new MyClassType(); expectedOutput = new MyClassType(); }
public MyMetadataAttribute(MyClassType type) { Type = type; }