< Summary

Class:Azure.Messaging.EventGrid.SystemEventTypeMappings
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Customization\SystemEventTypeMappings.cs
Covered lines:105
Uncovered lines:0
Coverable lines:105
Total lines:119
Line coverage:100% (105 of 105)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.cctor()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Customization\SystemEventTypeMappings.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using System.Collections.Generic;
 6using System.Text.Json;
 7using Azure.Messaging.EventGrid.SystemEvents;
 8
 9namespace Azure.Messaging.EventGrid
 10{
 11    internal class SystemEventTypeMappings
 12    {
 213        public static readonly IReadOnlyDictionary<string, Func<JsonElement, object>> SystemEventDeserializers = new Dic
 214        {
 215            // KEEP THIS SORTED BY THE NAME OF THE PUBLISHING SERVICE
 216            // Add handling for additional event types here.
 217
 218            // AppConfiguration events
 219            { EventTypes.AppConfigurationKeyValueDeletedEvent, AppConfigurationKeyValueDeletedEventData.DeserializeAppCo
 220            { EventTypes.AppConfigurationKeyValueModifiedEvent, AppConfigurationKeyValueModifiedEventData.DeserializeApp
 221
 222            // ContainerRegistry events
 223            { EventTypes.ContainerRegistryImagePushedEvent, ContainerRegistryImagePushedEventData.DeserializeContainerRe
 224            { EventTypes.ContainerRegistryImageDeletedEvent, ContainerRegistryImageDeletedEventData.DeserializeContainer
 225            { EventTypes.ContainerRegistryChartDeletedEvent, ContainerRegistryChartDeletedEventData.DeserializeContainer
 226            { EventTypes.ContainerRegistryChartPushedEvent, ContainerRegistryChartPushedEventData.DeserializeContainerRe
 227
 228            // IoTHub Device events
 229            { EventTypes.IoTHubDeviceCreatedEvent, IotHubDeviceCreatedEventData.DeserializeIotHubDeviceCreatedEventData 
 230            { EventTypes.IoTHubDeviceDeletedEvent, IotHubDeviceDeletedEventData.DeserializeIotHubDeviceDeletedEventData 
 231            { EventTypes.IoTHubDeviceConnectedEvent, IotHubDeviceConnectedEventData.DeserializeIotHubDeviceConnectedEven
 232            { EventTypes.IoTHubDeviceDisconnectedEvent, IotHubDeviceDisconnectedEventData.DeserializeIotHubDeviceDisconn
 233            { EventTypes.IotHubDeviceTelemetryEvent, IotHubDeviceTelemetryEventData.DeserializeIotHubDeviceTelemetryEven
 234
 235            // EventGrid events
 236            { EventTypes.EventGridSubscriptionValidationEvent, SubscriptionValidationEventData.DeserializeSubscriptionVa
 237            { EventTypes.EventGridSubscriptionDeletedEvent, SubscriptionDeletedEventData.DeserializeSubscriptionDeletedE
 238
 239            // Event Hub events
 240            { EventTypes.EventHubCaptureFileCreatedEvent, EventHubCaptureFileCreatedEventData.DeserializeEventHubCapture
 241
 242            // MachineLearningServices events
 243            { EventTypes.MachineLearningServicesDatasetDriftDetectedEvent, MachineLearningServicesDatasetDriftDetectedEv
 244            { EventTypes.MachineLearningServicesModelDeployedEvent, MachineLearningServicesModelDeployedEventData.Deseri
 245            { EventTypes.MachineLearningServicesModelRegisteredEvent, MachineLearningServicesModelRegisteredEventData.De
 246            { EventTypes.MachineLearningServicesRunCompletedEvent, MachineLearningServicesRunCompletedEventData.Deserial
 247            { EventTypes.MachineLearningServicesRunStatusChangedEvent, MachineLearningServicesRunStatusChangedEventData.
 248
 249            // Maps events
 250            { EventTypes.MapsGeofenceEnteredEvent, MapsGeofenceEnteredEventData.DeserializeMapsGeofenceEnteredEventData 
 251            { EventTypes.MapsGeofenceExitedEvent, MapsGeofenceExitedEventData.DeserializeMapsGeofenceExitedEventData },
 252            { EventTypes.MapsGeofenceResultEvent, MapsGeofenceResultEventData.DeserializeMapsGeofenceResultEventData },
 253
 254            // Media Services events
 255            { EventTypes.MediaJobStateChangeEvent, MediaJobStateChangeEventData.DeserializeMediaJobStateChangeEventData 
 256            { EventTypes.MediaJobOutputStateChangeEvent, MediaJobOutputStateChangeEventData.DeserializeMediaJobOutputSta
 257            { EventTypes.MediaJobScheduledEvent, MediaJobScheduledEventData.DeserializeMediaJobScheduledEventData },
 258            { EventTypes.MediaJobProcessingEvent, MediaJobProcessingEventData.DeserializeMediaJobProcessingEventData },
 259            { EventTypes.MediaJobCancelingEvent, MediaJobCancelingEventData.DeserializeMediaJobCancelingEventData },
 260            { EventTypes.MediaJobFinishedEvent, MediaJobFinishedEventData.DeserializeMediaJobFinishedEventData },
 261            { EventTypes.MediaJobCanceledEvent, MediaJobCanceledEventData.DeserializeMediaJobCanceledEventData },
 262            { EventTypes.MediaJobErroredEvent, MediaJobErroredEventData.DeserializeMediaJobErroredEventData },
 263            { EventTypes.MediaJobOutputCanceledEvent, MediaJobOutputCanceledEventData.DeserializeMediaJobOutputCanceledE
 264            { EventTypes.MediaJobOutputCancelingEvent, MediaJobOutputCancelingEventData.DeserializeMediaJobOutputCanceli
 265            { EventTypes.MediaJobOutputErroredEvent, MediaJobOutputErroredEventData.DeserializeMediaJobOutputErroredEven
 266            { EventTypes.MediaJobOutputFinishedEvent, MediaJobOutputFinishedEventData.DeserializeMediaJobOutputFinishedE
 267            { EventTypes.MediaJobOutputProcessingEvent, MediaJobOutputProcessingEventData.DeserializeMediaJobOutputProce
 268            { EventTypes.MediaJobOutputScheduledEvent, MediaJobOutputScheduledEventData.DeserializeMediaJobOutputSchedul
 269            { EventTypes.MediaJobOutputProgressEvent, MediaJobOutputProgressEventData.DeserializeMediaJobOutputProgressE
 270            { EventTypes.MediaLiveEventEncoderConnectedEvent, MediaLiveEventEncoderConnectedEventData.DeserializeMediaLi
 271            { EventTypes.MediaLiveEventConnectionRejectedEvent, MediaLiveEventConnectionRejectedEventData.DeserializeMed
 272            { EventTypes.MediaLiveEventEncoderDisconnectedEvent, MediaLiveEventEncoderDisconnectedEventData.DeserializeM
 273            { EventTypes.MediaLiveEventIncomingStreamReceivedEvent, MediaLiveEventIncomingStreamReceivedEventData.Deseri
 274            { EventTypes.MediaLiveEventIncomingStreamsOutOfSyncEvent, MediaLiveEventIncomingStreamsOutOfSyncEventData.De
 275            { EventTypes.MediaLiveEventIncomingVideoStreamsOutOfSyncEvent, MediaLiveEventIncomingVideoStreamsOutOfSyncEv
 276            { EventTypes.MediaLiveEventIncomingChunkDroppedEvent, MediaLiveEventIncomingDataChunkDroppedEventData.Deseri
 277            { EventTypes.MediaLiveEventIngestHeartbeatEvent, MediaLiveEventIngestHeartbeatEventData.DeserializeMediaLive
 278            { EventTypes.MediaLiveEventTrackDiscontinuityDetectedEvent, MediaLiveEventTrackDiscontinuityDetectedEventDat
 279
 280            // Resource Manager (Azure Subscription/Resource Group) events
 281            { EventTypes.ResourceWriteSuccessEvent, ResourceWriteSuccessData.DeserializeResourceWriteSuccessData },
 282            { EventTypes.ResourceWriteFailureEvent, ResourceWriteFailureData.DeserializeResourceWriteFailureData },
 283            { EventTypes.ResourceWriteCancelEvent, ResourceWriteCancelData.DeserializeResourceWriteCancelData },
 284            { EventTypes.ResourceDeleteSuccessEvent, ResourceDeleteSuccessData.DeserializeResourceDeleteSuccessData },
 285            { EventTypes.ResourceDeleteFailureEvent, ResourceDeleteFailureData.DeserializeResourceDeleteFailureData },
 286            { EventTypes.ResourceDeleteCancelEvent, ResourceDeleteCancelData.DeserializeResourceDeleteCancelData },
 287            { EventTypes.ResourceActionSuccessEvent, ResourceActionSuccessData.DeserializeResourceActionSuccessData },
 288            { EventTypes.ResourceActionFailureEvent, ResourceActionFailureData.DeserializeResourceActionFailureData },
 289            { EventTypes.ResourceActionCancelEvent, ResourceActionCancelData.DeserializeResourceActionCancelData },
 290
 291            // ServiceBus events
 292            { EventTypes.ServiceBusActiveMessagesAvailableWithNoListenersEvent, ServiceBusActiveMessagesAvailableWithNoL
 293            { EventTypes.ServiceBusDeadletterMessagesAvailableWithNoListenerEvent, ServiceBusDeadletterMessagesAvailable
 294
 295            // Storage events
 296            { EventTypes.StorageBlobCreatedEvent, StorageBlobCreatedEventData.DeserializeStorageBlobCreatedEventData },
 297            { EventTypes.StorageBlobDeletedEvent, StorageBlobDeletedEventData.DeserializeStorageBlobDeletedEventData },
 298            { EventTypes.StorageBlobRenamedEvent, StorageBlobRenamedEventData.DeserializeStorageBlobRenamedEventData },
 299            { EventTypes.StorageDirectoryCreatedEvent, StorageDirectoryCreatedEventData.DeserializeStorageDirectoryCreat
 2100            { EventTypes.StorageDirectoryDeletedEvent, StorageDirectoryDeletedEventData.DeserializeStorageDirectoryDelet
 2101            { EventTypes.StorageDirectoryRenamedEvent, StorageDirectoryRenamedEventData.DeserializeStorageDirectoryRenam
 2102
 2103            // App Service
 2104            { EventTypes.WebAppUpdated, WebAppUpdatedEventData.DeserializeWebAppUpdatedEventData },
 2105            { EventTypes.WebBackupOperationStarted, WebBackupOperationStartedEventData.DeserializeWebBackupOperationStar
 2106            { EventTypes.WebBackupOperationCompleted, WebBackupOperationCompletedEventData.DeserializeWebBackupOperation
 2107            { EventTypes.WebBackupOperationFailed, WebBackupOperationFailedEventData.DeserializeWebBackupOperationFailed
 2108            { EventTypes.WebRestoreOperationStarted, WebRestoreOperationStartedEventData.DeserializeWebRestoreOperationS
 2109            { EventTypes.WebRestoreOperationCompleted, WebRestoreOperationCompletedEventData.DeserializeWebRestoreOperat
 2110            { EventTypes.WebRestoreOperationFailed, WebRestoreOperationFailedEventData.DeserializeWebRestoreOperationFai
 2111            { EventTypes.WebSlotSwapStarted, WebSlotSwapStartedEventData.DeserializeWebSlotSwapStartedEventData },
 2112            { EventTypes.WebSlotSwapCompleted, WebSlotSwapCompletedEventData.DeserializeWebSlotSwapCompletedEventData },
 2113            { EventTypes.WebSlotSwapFailed, WebSlotSwapFailedEventData.DeserializeWebSlotSwapFailedEventData },
 2114            { EventTypes.WebSlotSwapWithPreviewStarted, WebSlotSwapWithPreviewStartedEventData.DeserializeWebSlotSwapWit
 2115            { EventTypes.WebSlotSwapWithPreviewCancelled, WebSlotSwapWithPreviewCancelledEventData.DeserializeWebSlotSwa
 2116            { EventTypes.WebAppServicePlanUpdated, WebAppServicePlanUpdatedEventData.DeserializeWebAppServicePlanUpdated
 2117        };
 118    }
 119}

Methods/Properties

.cctor()