Exemple #1
0
        private static object InvocationManager_OnPropertyInvoked(object target, PropertyInvocationHandlerEventArgs e)
        {
            if (e.IsUpdating)
            {
                if (data.ContainsKey(e.InvokedProperty.Name))
                {
                    data[e.InvokedProperty.Name] = (string)e.Value;
                }
                else
                {
                    data.Add(e.InvokedProperty.Name, (string)e.Value);
                }

                return(null);
            }
            else
            {
                return(data[e.InvokedProperty.Name]);
            }
        }
        public object ProcessPropertySetInvocation(PropertyInfo property, object value)
        {
            PropertyInvocationHandlerEventArgs e = new PropertyInvocationHandlerEventArgs(property, value, true);

            return(this.invocationHandler.HandleOnPropertyInvoked(invocationHandler, e));
        }
        public object ProcessPropertyGetInvocation(PropertyInfo property)
        {
            PropertyInvocationHandlerEventArgs e = new PropertyInvocationHandlerEventArgs(property, null, false);

            return(this.invocationHandler.HandleOnPropertyInvoked(invocationHandler, e));
        }