mirror of https://github.com/AMT-Cheif/Stylet.git
Change an exception to an assertion, since I can't hit it in tests
This commit is contained in:
parent
7203b02cdf
commit
7bdafdc04a
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -41,8 +42,7 @@ namespace Stylet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual void EnsureItem(T newItem)
|
protected virtual void EnsureItem(T newItem)
|
||||||
{
|
{
|
||||||
if (newItem == null)
|
Debug.Assert(newItem != null);
|
||||||
throw new ArgumentNullException("newItem");
|
|
||||||
|
|
||||||
var newItemAsChild = newItem as IChild;
|
var newItemAsChild = newItem as IChild;
|
||||||
if (newItemAsChild != null && newItemAsChild.Parent != this)
|
if (newItemAsChild != null && newItemAsChild.Parent != this)
|
||||||
|
|
Loading…
Reference in New Issue