public IEnumerator PropertyBagPreparation_WhenRecursiveIsSet_PrepareAllBags() { if (Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.OuterContainer>()) { yield break; } Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.OuterContainer>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.InnerContainer>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.InnerContainer2>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.Vec2>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.Vec3>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.IData>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.Data>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.GenericType <NonAsyncAndRecursive.Param1, NonAsyncAndRecursive.Param2> >(), Is.False); var options = new PropertyBagUtility.PropertyBagPreparationOptions { Recursive = true }; PropertyBagUtility.RequestPropertyBagGeneration <NonAsyncAndRecursive.OuterContainer>(options); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.OuterContainer>(), Is.True); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.InnerContainer>(), Is.True); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.InnerContainer2>(), Is.True); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.Vec2>(), Is.True); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.Vec3>(), Is.True); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.IData>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.Data>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <NonAsyncAndRecursive.GenericType <NonAsyncAndRecursive.Param1, NonAsyncAndRecursive.Param2> >(), Is.True); }
public IEnumerator PropertyBagAsyncPreparation_WhenRecursiveIsUnset_PrepareASingleBag() { if (Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.OuterContainer>()) { yield break; } Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.OuterContainer>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.InnerContainer>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.InnerContainer2>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.Vec2>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.Vec3>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.IData>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.Data>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.GenericType <AsyncNonRecursive.Param1, AsyncNonRecursive.Param2> >(), Is.False); var options = new PropertyBagUtility.PropertyBagPreparationOptions { Recursive = false, Async = true }; PropertyBagUtility.RequestPropertyBagGeneration <AsyncNonRecursive.OuterContainer>(options); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.OuterContainer>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.InnerContainer>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.InnerContainer2>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.Vec2>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.Vec3>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.IData>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.Data>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.GenericType <AsyncNonRecursive.Param1, AsyncNonRecursive.Param2> >(), Is.False); for (var i = 0; i < 25; ++i) { yield return(null); } Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.OuterContainer>(), Is.True); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.InnerContainer>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.InnerContainer2>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.Vec2>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.Vec3>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.IData>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.Data>(), Is.False); Assert.That(Properties.Internal.PropertyBagStore.Exists <AsyncNonRecursive.GenericType <AsyncNonRecursive.Param1, AsyncNonRecursive.Param2> >(), Is.False); }