CreateInstance() public method

public CreateInstance ( object arguments ) : object
arguments object
return object
示例#1
0
		public void CreateInstanceList ()
		{
			var i = new XamlTypeInvoker (new XamlType (typeof (List<int>), sctx));
			i.CreateInstance (new object [0]);
		}
示例#2
0
		public void CreateInstanceArray ()
		{
			var i = new XamlTypeInvoker (new XamlType (typeof (int []), sctx));
			i.CreateInstance (new object [0]); // no default constructor.
		}
示例#3
0
		public void CreateInstanceList_ArgumentMismatch ()
		{
			var i = new XamlTypeInvoker (new XamlType (typeof (List<int>), sctx));
			i.CreateInstance (new object [] {"foo"});
		}
示例#4
0
		public void CreateInstanceNoUnderlyingType ()
		{
			var i = new XamlTypeInvoker (new XamlType ("urn:foo", "FooType", null, sctx));
			i.CreateInstance (new object [0]); // unkown type is not supported
		}