X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.ComponentModel.Composition%2Fsrc%2FComponentModel%2FSystem%2FComponentModel%2FComposition%2FCreationPolicy.cs;fp=mcs%2Fclass%2FSystem.ComponentModel.Composition%2Fsrc%2FComponentModel%2FSystem%2FComponentModel%2FComposition%2FCreationPolicy.cs;h=5a8d4cb158b1a9eebd81a3bc5f083a68a07c244c;hb=e3f39fb13c1ec6974f9df12b6b0457d761339077;hp=0000000000000000000000000000000000000000;hpb=ecfa2d0c12ed068425a01499c06e4c238535ffb2;p=mono.git diff --git a/mcs/class/System.ComponentModel.Composition/src/ComponentModel/System/ComponentModel/Composition/CreationPolicy.cs b/mcs/class/System.ComponentModel.Composition/src/ComponentModel/System/ComponentModel/Composition/CreationPolicy.cs new file mode 100644 index 00000000000..5a8d4cb158b --- /dev/null +++ b/mcs/class/System.ComponentModel.Composition/src/ComponentModel/System/ComponentModel/Composition/CreationPolicy.cs @@ -0,0 +1,36 @@ +// ----------------------------------------------------------------------- +// Copyright (c) Microsoft Corporation. All rights reserved. +// ----------------------------------------------------------------------- +using System; +using System.ComponentModel.Composition.Hosting; +using System.ComponentModel.Composition.Primitives; + +namespace System.ComponentModel.Composition +{ + /// + /// Option placed on a type that controls when the creates + /// a new instance of a . + /// + public enum CreationPolicy : int + { + /// + /// Let the choose the most appropriate + /// for the part given the current context. This is the default , with + /// the choosing by default + /// unless the or importer requests . + /// + Any = 0, + + /// + /// A single shared instance of the associated will be created + /// by the and shared by all requestors. + /// + Shared = 1, + + /// + /// A new non-shared instance of the associated will be created + /// by the for every requestor. + /// + NonShared = 2, + } +}