public void Contains() { var td = new TypeList <IServiceCollection> { typeof(ServiceCollection) }; td.Contains <ServiceCollection>().ShouldBeTrue(); td.Contains(typeof(ServiceCollection)).ShouldBeTrue(); td.Contains <IServiceCollection>().ShouldBeFalse(); td.Contains(typeof(IServiceCollection)).ShouldBeFalse(); Should.Throw <ArgumentException>(() => td.Contains(typeof(IServiceProvider))); }
public void BlackListType(string _newType) { if (TypeList.Contains(_newType)) { return; } TypeList.Add(_newType); }
public void SetView <T>() where T : View { if (list.Contains <T>()) { current = Get <T>(); } if (previous.Count > 0 && previous.Peek() != current) { previous.Push(current); } DrawView(current); }