 | GenericNonSingletonProvider class |
Provides generic classes with private standard constructor as non-singletons.
Inheritance hierarchy Namespace: NetEti.GlobalsAssembly: NetEti.Global (in NetEti.Global.dll) Version: 1.0.0+ad672dc5430e1683eae7461ce3945c8e9dce1c49
Syntaxpublic static class GenericNonSingletonProvider
Public NotInheritable Class GenericNonSingletonProvider
public ref class GenericNonSingletonProvider abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type GenericNonSingletonProvider = class end
The GenericNonSingletonProvider Type exposes the following members.
Methods
Remarks
File: GenericNonSingletonProvider.cs
Source: josupeit.com/Weblog/Computer Science and Technology/C# and .NET in general/Implementation of the Singleton
with minor adjustments from Erik Nagel, NetEti
08.03.2012 Erik Nagel: created
2012-03-08 Erik Nagel: Now not only existing instances are returned,
if they have exactly the generic type T, but also if they are of T
are derived. This means that within a framework, for example
known base classes from unknown but derived classes as
singletons can be accessed, even if the base classes derived from the
classes must first be instantiated outside the framework.
See also