public void InterfaceProperty()
 {
     PropertyInfo property = null;
     IPropertyClass proxy = new InterfacePropertyClass(new InvocationHandler(invocation =>
     {
         property = invocation.Property;
         return Task.FromResult<object>(null);
     }));
     proxy.Property = "foo";
     Assert.AreEqual(nameof(IPropertyClass.Property), property.Name.Split('.').Last());
 }
Example #2
0
        public void InterfaceProperty()
        {
            PropertyInfo   property = null;
            IPropertyClass proxy    = new InterfacePropertyClass(new InvocationHandler(invocation =>
            {
                property = invocation.Property;
                return(Task.FromResult <object>(null));
            }));

            proxy.Property = "foo";
            Assert.AreEqual(nameof(IPropertyClass.Property), property.Name.Split('.').Last());
        }