From d82cc67a44e108db1aac7f2914e6efe805c90ca3 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Mon, 14 Sep 2015 16:10:51 -0400 Subject: [PATCH] Added (totally not optimized) property name indexer for CustomOptionCollection --- .../Libraries/UniversalEditor.Core/CustomOption.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CSharp/V5/Libraries/UniversalEditor.Core/CustomOption.cs b/CSharp/V5/Libraries/UniversalEditor.Core/CustomOption.cs index 02a666b4..1a7069f7 100644 --- a/CSharp/V5/Libraries/UniversalEditor.Core/CustomOption.cs +++ b/CSharp/V5/Libraries/UniversalEditor.Core/CustomOption.cs @@ -108,6 +108,19 @@ namespace UniversalEditor public class CustomOptionCollection : System.Collections.ObjectModel.Collection { + + public CustomOption this[string propertyName] + { + get + { + foreach (CustomOption co in this) + { + if (co.PropertyName == propertyName) return co; + } + return null; + } + } + } private string mvarPropertyName = String.Empty;