[runtime] Fix corlib out of date error with disabled COM
[mono.git] / mcs / class / referencesource / System.Activities.Presentation / System.Activities.Presentation / System / Activities / Presentation / ViewState / ViewStateManager.cs
1 //----------------------------------------------------------------
2 // <copyright company="Microsoft Corporation">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //----------------------------------------------------------------
6
7 namespace System.Activities.Presentation.ViewState
8 {
9     using System.Collections.Generic;
10     using System.Collections.ObjectModel;
11     using System.Windows.Markup;
12
13     /// <summary>
14     /// This class is used to hold ViewStateData for all activities in the workflow as an attached
15     /// property on the root of the xaml document.
16     /// </summary>
17     [ContentProperty("ViewStateData")]
18     public sealed class ViewStateManager
19     {
20         Collection<ViewStateData> viewStateData;
21
22         /// <summary>
23         /// Creates a new instance of ViewStateManager
24         /// </summary>
25         public ViewStateManager()
26         {
27         }
28
29         /// <summary>
30         /// Gets a collection of ViewStateData for all activities in the workflow
31         /// </summary>
32         public Collection<ViewStateData> ViewStateData
33         {
34             get
35             {
36                 if (this.viewStateData == null)
37                 {
38                     this.viewStateData = new Collection<ViewStateData>();
39                 }
40                 return this.viewStateData;
41             }
42         }
43     }
44 }