public void pop() { var chain1 = new ProvenanceChain(new Provenance[] { p1, p2, p3 }); var chain2 = chain1.Push(p4); chain2.Pop().ShouldBeTheSameAs(chain1); }
public ActionLog(IConfigurationAction action, ProvenanceChain provenanceChain) { _action = action; _provenanceChain = provenanceChain; Id = Guid.NewGuid(); _description = new Lazy<Description>(() => Description.For(action)); }
public ServiceRegistryLog(ServiceRegistry registry, ProvenanceChain provenanceChain) { _registry = registry; _provenanceChain = registry.GetType() == typeof(ServiceRegistry) ? provenanceChain : provenanceChain.Push(new ServiceRegistryProvenance(registry)); Id = Guid.NewGuid(); _description = new Lazy<Description>(() => Description.For(registry)); }
public void push() { var chain1 = new ProvenanceChain(new Provenance[] { p1, p2, p3 }); var chain2 = chain1.Push(p4); chain2.Chain.ShouldHaveTheSameElementsAs(p1, p2, p3, p4); }
public void prepend() { var chain1 = new ProvenanceChain(new Provenance[] { p1, p2 }); chain1.Prepend(new Provenance[]{p3, p4}); chain1.Chain.ShouldHaveTheSameElementsAs(p3, p4, p1, p2); }
public void prepend() { var chain1 = new ProvenanceChain(new Provenance[] { p1, p2 }); chain1.Prepend(new Provenance[] { p3, p4 }); chain1.Chain.ShouldHaveTheSameElementsAs(p3, p4, p1, p2); }
public void equals_method_is_predictable() { var chain1 = new ProvenanceChain(new Provenance[] { p1, p2, p3 }); var chain2 = new ProvenanceChain(new Provenance[] { p1, p2, p3 }); chain1.ShouldEqual(chain2); chain2.ShouldEqual(chain1); }
public void equals_method_is_predictable() { var chain1 = new ProvenanceChain(new Provenance[] {p1, p2, p3}); var chain2 = new ProvenanceChain(new Provenance[] {p1, p2, p3}); chain1.ShouldEqual(chain2); chain2.ShouldEqual(chain1); }
/// <summary> /// Honestly, this is 50% a HACK. This just gives ConfigGraph a chance to apply the default endpoint action source /// if the FubuRegistry doesn't already have any /// </summary> public void Seal() { var actions = _configurations[ConfigurationType.Discovery]; if (!actions.Logs.Any(x => x.Action is ActionSourceRunner)) { _currentProvenance = new ProvenanceChain(new Provenance[] { new ConfigurationPackProvenance(new DiscoveryActionsConfigurationPack()), }); Add(new EndpointActionSource()); } Pop(); }
public void Fill(ProvenanceChain provenanceStack, IConfigurationAction action) { if (provenanceStack == null || !provenanceStack.Chain.Any()) { throw new ArgumentException("No provenance supplied!"); } Type actionType = action.GetType(); if (TypeIsUnique(actionType) && _logs.Any(x => x.Action.GetType() == actionType)) { return; } _logs.Fill(new ActionLog(action, provenanceStack)); }
public void Push(IPackageInfo bottle) { _currentProvenance = _currentProvenance.Push(new BottleProvenance(bottle)); }
public void Add(ConfigurationPack pack) { _currentProvenance = new ProvenanceChain(new Provenance[] { new ConfigurationPackProvenance(pack), }); pack.WriteTo(this); }
public void Pop() { _currentProvenance = _currentProvenance.Pop(); }
public void Push(IFubuRegistryExtension extension) { _currentProvenance = (_currentProvenance ?? new ProvenanceChain(new Provenance[0])).Push(new FubuRegistryExtensionProvenance(extension)); }
public void Push(IPackageInfo bottle) { _currentProvenance = (_currentProvenance ?? new ProvenanceChain(new Provenance[0])).Push(new BottleProvenance(bottle)); }
public void Push(FubuRegistry registry) { _currentProvenance = (_currentProvenance ?? new ProvenanceChain(new Provenance[0])).Push(new FubuRegistryProvenance(registry)); }
public void Push(FubuRegistry registry) { _currentProvenance = _currentProvenance.Push(new FubuRegistryProvenance(registry)); }
public void Push(IFubuRegistryExtension extension) { _currentProvenance = _currentProvenance.Push(new FubuRegistryExtensionProvenance(extension)); }