示例#1
0
        private bool TryBindPath(Expression expr)
        {
            var path = expr.GetPathToParameter(_rootParameterType);

            if (path != null)
            {
                var            node         = _rootNode;
                BindableMember parentMember = null;

                foreach (var entry in path)
                {
                    if (parentMember != null)
                    {
                        node = node.GetSubNode(parentMember);
                    }

                    if (entry.CanSubscribe)
                    {
                        node.AddAction(entry.Name, _actionIndex);
                    }

                    parentMember = entry;
                }

                return(true);
            }

            return(false);
        }
示例#2
0
 public OptionInfo(string menuName, BindableMember <PropertyInfo> property)
 {
     this.MenuName = menuName;
     this.Property = property;
 }