From 218e2425b576bad533a112a6ada913ea5adcd6ac Mon Sep 17 00:00:00 2001 From: Dirkster99 Date: Fri, 3 Jul 2020 20:46:32 +0200 Subject: [PATCH] Add in code docu --- .../AvalonDock/Converters/ConverterCreater.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/Components/AvalonDock/Converters/ConverterCreater.cs b/source/Components/AvalonDock/Converters/ConverterCreater.cs index 63d81b6e..8e8d122f 100644 --- a/source/Components/AvalonDock/Converters/ConverterCreater.cs +++ b/source/Components/AvalonDock/Converters/ConverterCreater.cs @@ -3,6 +3,10 @@ namespace AvalonDock.Converters { + /// + /// Implements a static factory pattern for instances of WPF converters + /// and ensures that every single converter is instanciated only once. + /// internal class ConverterCreater { #region Private fields @@ -13,6 +17,14 @@ internal class ConverterCreater #region Public methods + /// + /// Gets an available instance of the indicated type or a brand new instance + /// if the indicated type was not created, yet (to be returned on next query of instance for type ). + /// + /// This method ensures that every instance per class is instanciated only once. + /// + /// Type of class to be returned form this factory. + /// public static T Get() where T : new() { if (!ConverterMap.ContainsKey(typeof(T)))