Exemplo n.º 1
0
        public ModelInfo(Expression <Func <object> > rootObject, string name, bool nonClosable)
        {
            this.name        = name;
            this.NonClosable = nonClosable;

            this.rootObjectAdapter = this.CreatePropertyAdapter(
                nameof(ModelInfo.RootObject),
                rootObject
                );

            this.rootAdapter = this.CreatePropertyAdapter(
                nameof(ModelInfo.Root),
                () => ModelNodeBase.GetNode(this.RootObject)
                );
        }
Exemplo n.º 2
0
 private void UpdateNode()
 {
     if (this.propertyInfo.GetIndexParameters().Any())
     {
         //Ignore indexer for the moment
         this.SetAndInvoke(nameof(this.Value), ref this.value, null);
     }
     else
     {
         object Value;
         try
         {
             Value = this.propertyInfo.GetValue(this.owner, null);
         }
         catch (Exception Exception)
         {
             Value = Exception;
         }
         this.SetAndInvoke(nameof(this.Value), ref this.value, ModelNodeBase.GetNode(Value));
     }
 }
Exemplo n.º 3
0
 private EnumerationItemNode(object value, int index)
 {
     this.value = ModelNodeBase.GetNode(value);
     this.Name  = $"[{index}]";
 }