internal static PlayModeTestAttribute GetAttribute(MethodInfo method) { if (!Attribute.IsDefined(method, typeof(PlayModeTestAttribute))) { return null; } return (Attribute.GetCustomAttribute(method, typeof(PlayModeTestAttribute)) as PlayModeTestAttribute); }