SetValue() public method

public SetValue ( object instance, object value ) : void
instance object
value object
return void
コード例 #1
0
		public void SetValueOnReadOnlyProperty ()
		{
			var pi = str_len;
			var i = new XamlMemberInvoker (new XamlMember (pi, sctx));
			i.SetValue ("hello", 5);
		}
コード例 #2
0
		public void SetValueNullObject ()
		{
			var pi = sb_len;
			var i = new XamlMemberInvoker (new XamlMember (pi, sctx));
			i.SetValue (null, 5);
		}
コード例 #3
0
		public void SetValueOnEvent ()
		{
			var ei = ass_load;
			var i = new XamlMemberInvoker (new XamlMember (ei, sctx));
			i.SetValue (AppDomain.CurrentDomain, new AssemblyLoadEventHandler (DummyAssemblyLoad));
		}
コード例 #4
0
		public void SetValueOnEventValueMismatch ()
		{
			var ei = ass_load;
			var i = new XamlMemberInvoker (new XamlMember (ei, sctx));
			i.SetValue (AppDomain.CurrentDomain, 5);
		}
コード例 #5
0
		public void SetValueOnIrrelevantObject ()
		{
			var pi = sb_len;
			var i = new XamlMemberInvoker (new XamlMember (pi, sctx));
			i.SetValue ("hello", 5);
		}
コード例 #6
0
		public void SetValueOnReadWriteProperty ()
		{
			var pi = sb_len;
			var i = new XamlMemberInvoker (new XamlMember (pi, sctx));
			var sb = new StringBuilder ();
			i.SetValue (sb, 5);
			Assert.AreEqual (5, sb.Length, "#1");
		}