1 // -----------------------------------------------------------------------
\r
2 // Copyright (c) Microsoft Corporation. All rights reserved.
\r
3 // -----------------------------------------------------------------------
\r
5 using System.ComponentModel.Composition.Hosting;
\r
6 using System.ComponentModel.Composition.Primitives;
\r
8 namespace System.ComponentModel.Composition
\r
11 /// Option placed on a type that controls when the <see cref="CompositionContainer"/> creates
\r
12 /// a new instance of a <see cref="ComposablePart"/>.
\r
14 public enum CreationPolicy : int
\r
17 /// Let the <see cref="CompositionContainer"/> choose the most appropriate <see cref="CreationPolicy"/>
\r
18 /// for the part given the current context. This is the default <see cref="CreationPolicy"/>, with
\r
19 /// the <see cref="CompositionContainer"/> choosing <see cref="CreationPolicy.Shared"/> by default
\r
20 /// unless the <see cref="ComposablePart"/> or importer requests <see cref="CreationPolicy.NonShared"/>.
\r
25 /// A single shared instance of the associated <see cref="ComposablePart"/> will be created
\r
26 /// by the <see cref="CompositionContainer"/> and shared by all requestors.
\r
31 /// A new non-shared instance of the associated <see cref="ComposablePart"/> will be created
\r
32 /// by the <see cref="CompositionContainer"/> for every requestor.
\r