public void parse_a_three_level_property() { var path = new DictionaryPath("A.B.C.a"); path.Set(theSource, 1); theDictionary.Child("A").Child("B").Child("C")["a"].ShouldEqual(1); }
/// <summary> /// Can be used with dotted paths like: AppSettings.Child.Nested.Property1 /// </summary> /// <param name="key"></param> /// <returns></returns> public object this[string key] { get { var path = new DictionaryPath(key); return(path.GetParentSource(this).Get(path.Key)); } set { var path = new DictionaryPath(key); _children[path].Set(path.Key, value); } }
protected override IXafResourceManagerParameters GetXafResourceManagerParameters() { var path = new DictionaryPath { new DictionaryPathItem(CaptionHelper.localizationGroupNodeName, CaptionHelper.localizationGroupNameAttribute, "Exceptions"), new DictionaryPathItem(CaptionHelper.localizationGroupNodeName, CaptionHelper.localizationGroupNameAttribute, "UserVisibleExceptions"), new DictionaryPathItem(CaptionHelper.localizationGroupNodeName, CaptionHelper.localizationGroupNameAttribute, "ConditionalEditorState") }; return new XafResourceManagerParameters( null, path, "DevExpress.ExpressApp.ConditionalEditorState.LocalizationResources", String.Empty, GetType().Assembly ); }
protected override IXafResourceManagerParameters GetXafResourceManagerParameters() { var path = new DictionaryPath { new DictionaryPathItem(CaptionHelper.localizationGroupNodeName, CaptionHelper.localizationGroupNameAttribute, "Exceptions"), new DictionaryPathItem(CaptionHelper.localizationGroupNodeName, CaptionHelper.localizationGroupNameAttribute, "UserVisibleExceptions"), new DictionaryPathItem(CaptionHelper.localizationGroupNodeName, CaptionHelper.localizationGroupNameAttribute, "ConditionalEditorState") }; return(new XafResourceManagerParameters( null, path, "DevExpress.ExpressApp.ConditionalEditorState.LocalizationResources", String.Empty, GetType().Assembly )); }