cca74f2aa74f1f669efafbeb9500e026e7779534
[mono.git] / mcs / class / referencesource / System.Activities.Presentation / System.Activities.Presentation / System / Activities / Presentation / Base / Core / PropertyEditing / PropertyOrderAttribute.cs
1 namespace System.Activities.Presentation.PropertyEditing {
2     using System;
3     using System.ComponentModel;
4     using System.Runtime;
5     using System.Activities.Presentation;
6
7     /// <summary>
8     /// Attribute that is used to attach a PropertyOrder to a property.
9     /// </summary>
10     [Fx.Tag.XamlVisible(false)]
11     [AttributeUsage(AttributeTargets.Property)]
12     sealed class PropertyOrderAttribute : Attribute {
13         private PropertyOrder _order;
14         
15         /// <summary>
16         /// Creates a PropertyOrderAttribute.
17         /// </summary>
18         /// <param name="order">The PropertyOrder to attach to the property</param>
19         /// <exception cref="ArgumentNullException">When order is null</exception>
20         public PropertyOrderAttribute(PropertyOrder order)
21         {
22             if (order == null)
23                 throw FxTrace.Exception.ArgumentNull("order");
24
25             _order = order;
26         }
27
28         /// <summary>
29         /// Gets the associated PropertyOrder
30         /// </summary>
31         public PropertyOrder Order {
32             get { return _order; }
33         }
34     }
35 }