[corlib] Avoid unnecessary ephemeron array resizes
[mono.git] / mcs / class / referencesource / System.Activities.Presentation / System.Activities.Presentation / System / Activities / Presentation / Debugger / AllowBreakpointAttribute.cs
1 // <copyright>
2 //   Copyright (c) Microsoft Corporation.  All rights reserved.
3 // </copyright>
4
5 namespace System.Activities.Presentation.Debug
6 {
7     using System.Activities;
8     using System.Activities.Presentation.View;
9     using System.Runtime;
10
11     /// <summary>
12     /// AllowBreakpointAttribute is an attribute to describe whether a type allow a breakpoint to be set on it.
13     /// </summary>
14     [Fx.Tag.XamlVisible(false)]
15     [AttributeUsage(AttributeTargets.Class)]
16     internal sealed class AllowBreakpointAttribute : Attribute
17     {
18         internal static bool IsBreakpointAllowed(Type breakpointCandidateType)
19         {
20             return typeof(Activity).IsAssignableFrom(breakpointCandidateType) || WorkflowViewService.GetAttribute<AllowBreakpointAttribute>(breakpointCandidateType) != null;
21         }
22     }
23 }