GetValue() public method

public GetValue ( object instance ) : object
instance object
return object
コード例 #1
0
		public void FromProperty ()
		{
			var pi = str_len;
			var i = new XamlMemberInvoker (new XamlMember (pi, sctx));
			Assert.AreEqual (pi.GetGetMethod (), i.UnderlyingGetter, "#1");
			Assert.IsNull (i.UnderlyingSetter, "#2");
			Assert.AreEqual (5, i.GetValue ("hello"), "#3");
		}
コード例 #2
0
		public void GetValueOnWriteOnlyProperty ()
		{
			var pi = xr_resolver;
			var i = new XamlMemberInvoker (new XamlMember (pi, sctx));
			i.GetValue (new XmlUrlResolver ());
		}
コード例 #3
0
		public void GetValueNullObject ()
		{
			var pi = str_len;
			var i = new XamlMemberInvoker (new XamlMember (pi, sctx));
			i.GetValue (null);
		}
コード例 #4
0
		public void GetValueOnEvent ()
		{
			var ei = ass_load;
			var i = new XamlMemberInvoker (new XamlMember (ei, sctx));
			i.GetValue (AppDomain.CurrentDomain);
		}
コード例 #5
0
		public void GetValueOnTypeValue ()
		{
			var xm = XamlLanguage.Type.GetMember ("Type");
			var i = new XamlMemberInvoker (xm);
			var o = i.GetValue (new TypeExtension (typeof (int)));
			Assert.AreEqual (typeof (int), o, "#1");
		}
コード例 #6
0
		public void GetValueOnIrrelevantObject ()
		{
			var pi = str_len;
			var i = new XamlMemberInvoker (new XamlMember (pi, sctx));
			i.GetValue (new StringBuilder ());
		}