Ejemplo n.º 1
0
        public object GetValue(object instance)
        {
            if (null == this._valueGetter)
            {
                if (Monitor.TryEnter(this))
                {
                    try
                    {
                        if (null == this._valueGetter)
                        {
                            this._valueGetter = MemberValueGetterContainer.GetMemberValueGetter(this.Definition.Property);
                        }
                    }
                    finally
                    {
                        Monitor.Exit(this);
                    }
                }
                else
                {
                    return(this.Definition.Property.GetMemberValue(instance));
                }
            }

            return(this._valueGetter(instance));
        }
Ejemplo n.º 2
0
        public object GetValue(object instance)
        {
            if (null == this._valueGetter)
            {
                this._valueGetter = MemberValueGetterContainer.GetMemberValueGetter(this.Definition.Property);
            }

            return(this._valueGetter(instance));
        }