System.Xaml.XamlObjectWriterInternal.PopulateObject C# (CSharp) Method

PopulateObject() private method

private PopulateObject ( bool considerPositionalParameters, IList contents ) : void
considerPositionalParameters bool
contents IList
return void
		void PopulateObject (bool considerPositionalParameters, IList<object> contents)
		{
			var state = object_states.Peek ();

			var args = state.Type.GetSortedConstructorArguments ();
			var argt = args != null ? (IList<XamlType>) (from arg in args select arg.Type).ToArray () : considerPositionalParameters ? state.Type.GetPositionalParameters (contents.Count) : null;

			var argv = new object [argt.Count];
			for (int i = 0; i < argv.Length; i++)
				argv [i] = GetCorrectlyTypedValue (argt [i], contents [i]);
			state.Value = state.Type.Invoker.CreateInstance (argv);
			state.IsInstantiated = true;
		}