Fix XMM scanning on Mac x86.
[mono.git] / mcs / class / referencesource / System.Activities.Presentation / System.Activities.Presentation / System / Activities / Presentation / Base / Core / PropertyEditing / propertyentrycollection.cs
1 namespace System.Activities.Presentation.PropertyEditing
2 {
3     using System;
4     using System.Collections.Generic;
5     using System.Text;
6     using System.Activities.Presentation;
7     using System.Collections;
8
9     /// <summary>
10     /// Collection class that is used to keep the collection of PropertyEntry instances for 
11     /// subproperties of a given PropertyEntry
12     /// </summary>
13     public abstract class PropertyEntryCollection : IEnumerable<PropertyEntry>
14     {
15
16         private PropertyValue _parentValue;
17
18         /// <summary>
19         /// Creates a PropertyEntryCollection.  For host implementations.
20         /// </summary>
21         /// <param name="parentValue">The parent PropertyValue</param>
22         /// <exception cref="ArgumentNullException">When parentValue is null</exception>
23         protected PropertyEntryCollection(PropertyValue parentValue)
24         {
25             if (parentValue == null)
26                 throw FxTrace.Exception.ArgumentNull("parentValue");
27
28             _parentValue = parentValue;
29         }
30
31         /// <summary>
32         /// Gets the parent PropertyValue
33         /// </summary>
34         public PropertyValue ParentValue { get { return _parentValue; } }
35
36         /// <summary>
37         /// Gets a PropertyEntry from this collection of the given name.  Used for
38         /// sub-property retrieval.
39         /// </summary>
40         /// <param name="propertyName">The name of the property</param>
41         /// <returns>PropertyEntry instance of the given name or null if it doesn't exist.</returns>
42         public abstract PropertyEntry this[string propertyName] { get; }
43
44         /// <summary>
45         /// Gets the number of PropertyEntry instances in this collection
46         /// (typically the number of sub-properties for the parent PropertyValue)
47         /// </summary>
48         public abstract int Count { get; }
49
50         /// <summary>
51         /// Returns an IEnumerator of all the PropertyEntry instances in this collection.
52         /// </summary>
53         /// <returns></returns>
54         public abstract IEnumerator<PropertyEntry> GetEnumerator();
55
56         IEnumerator IEnumerable.GetEnumerator()
57         {
58             return this.GetEnumerator();
59         }
60     }
61 }