Exemple #1
0
        private bool Get(IInvocation invocation, string name)
        {
            name = Clean(name, "get_");
            object adapterValue;

            if (_adapter.TryRead(name, out adapterValue))
            {
                var convertedValue = _converter.ConvertTo(invocation.Method.ReturnType, adapterValue);
                invocation.ReturnValue = convertedValue;
                return(true);
            }

            return(false);
        }
Exemple #2
0
 public bool TryRead(string name, out object value)
 {
     return(_adaptee.TryRead(name, out value));
 }