コード例 #1
0
        private bool DoAllPropertiesMatch(Event e)
        {
            if (this.GetType() != e.GetType())
                return false;

            var myProperties = this.GetType().GetProperties().Where(_ => _.Name != "Id");
            var otherProperties = e.GetType().GetProperties().Where(_ => _.Name != "Id");

            if (myProperties.Count() != otherProperties.Count())
                return false;

            foreach (var myProperty in myProperties)
            {
                var otherProperty = otherProperties.SingleOrDefault(_ => _.Name == myProperty.Name);

                if (otherProperty == null)
                    return false;

                if (!myProperty.GetValue(this, null).Equals(otherProperty.GetValue(e, null)))
                    return false;
            }

            return true;
        }
コード例 #2
0
 private static void ProjeziereEreignis(Event Event)
 {
 }
コード例 #3
0
 protected void Dispatch(Event Event)
 {
     _uncommitedEvents.Enqueue(Event);
     ((dynamic)this).Apply((dynamic)Event);
 }
コード例 #4
0
 public void Apply(Event e)
 {
 }