예제 #1
0
            public override V GetValue(T instance)
            {
                if (_dget != null)
                {
                    return(_dget.Invoke(instance));
                }

                return((V)_field.GetValue(instance));
            }
예제 #2
0
            /// <summary>
            /// Gets the value of the property of the
            /// supplied instance
            /// </summary>
            /// <param name="instance">An object instance, whose
            /// property value will be retrieved</param>
            public override V GetValue(T instance)
            {
                if (_dget != null)
                {
                    return(_dget.Invoke(instance));
                }
                if (_property.CanRead)
                {
                    return((V)_property.GetValue(instance, null));
                }

                throw Error.PropertyIsWriteOnly(_property);
            }