コード例 #1
0
        public void ReportAttachmentModified_GetKnownTypes()
        {
            var types = EntityModifiedMessage.GetKnownTypes();

            types.Should().NotBeEmpty();
            types.Count().Should().Be(23);
            types.Should().Contain(typeof(ReportAttachmentModified));
            types.Should().Contain(typeof(SummaryAttachmentModified));
            types.Should().Contain(typeof(ReportDrugModified));
            types.Should().Contain(typeof(SummaryDrugModified));
            types.Should().Contain(typeof(ReportEventModified));
            types.Should().Contain(typeof(SummaryEventModified));
            types.Should().Contain(typeof(ReportGunModified));
            types.Should().Contain(typeof(SummaryGunModified));
            types.Should().Contain(typeof(ReportNarrativeModified));
            types.Should().Contain(typeof(SummaryNarrativeModified));
            types.Should().Contain(typeof(ReportOffenseModified));
            types.Should().Contain(typeof(SummaryOffenseModified));
            types.Should().Contain(typeof(ReportOfficerModified));
            types.Should().Contain(typeof(SummaryOfficerModified));
            types.Should().Contain(typeof(ReportOrganizationModified));
            types.Should().Contain(typeof(SummaryOrganizationModified));
            types.Should().Contain(typeof(ReportPersonModified));
            types.Should().Contain(typeof(SummaryPersonModified));
            types.Should().Contain(typeof(ReportPropertyModified));
            types.Should().Contain(typeof(SummaryPropertyModified));
            types.Should().Contain(typeof(ReportVehicleModified));
            types.Should().Contain(typeof(SummaryVehicleModified));
            types.Should().Contain(typeof(SummaryCaseModified));
        }
コード例 #2
0
        private void RaiseEntityModifiedMessage(Person entity, string status)
        {
            var message = new EntityModifiedMessage
            {
                Sender = this,
                Entity = entity,
                Status = status
            };

            _eventAggregator.Raise(this, message);
        }