--- /dev/null
+// -----------------------------------------------------------------------\r
+// Copyright (c) Microsoft Corporation. All rights reserved.\r
+// -----------------------------------------------------------------------\r
+using System;\r
+using System.ComponentModel.Composition.Hosting;\r
+using System.ComponentModel.Composition.Primitives;\r
+\r
+namespace System.ComponentModel.Composition\r
+{\r
+ /// <summary>\r
+ /// Option placed on a type that controls when the <see cref="CompositionContainer"/> creates \r
+ /// a new instance of a <see cref="ComposablePart"/>.\r
+ /// </summary>\r
+ public enum CreationPolicy : int\r
+ {\r
+ /// <summary>\r
+ /// Let the <see cref="CompositionContainer"/> choose the most appropriate <see cref="CreationPolicy"/>\r
+ /// for the part given the current context. This is the default <see cref="CreationPolicy"/>, with\r
+ /// the <see cref="CompositionContainer"/> choosing <see cref="CreationPolicy.Shared"/> by default\r
+ /// unless the <see cref="ComposablePart"/> or importer requests <see cref="CreationPolicy.NonShared"/>.\r
+ /// </summary>\r
+ Any = 0,\r
+\r
+ /// <summary>\r
+ /// A single shared instance of the associated <see cref="ComposablePart"/> will be created\r
+ /// by the <see cref="CompositionContainer"/> and shared by all requestors.\r
+ /// </summary>\r
+ Shared = 1,\r
+\r
+ /// <summary>\r
+ /// A new non-shared instance of the associated <see cref="ComposablePart"/> will be created\r
+ /// by the <see cref="CompositionContainer"/> for every requestor.\r
+ /// </summary>\r
+ NonShared = 2,\r
+ }\r
+}\r