Example #1
0
            internal void AddInfluence([NotNull] IState contributingFactor)
            {
                Debug.Assert(Outcome != null,
                             $"A process attempted to call {nameof(AddInfluence)} on a {nameof(CausalEvent)} who's {nameof(Outcome)} field was null.");

                if (contributingFactor.IsValid)
                {
                    if (Outcome.IsValid && contributingFactor.AddDependent(Outcome))
                    {
                        Influences.Add(contributingFactor);
                    }
                }
                else
                {
                    Outcome.Invalidate(contributingFactor);
                }
            }