Framework/Listeners/AzListenerHelper.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Set-StrictMode -Version Latest
#Class to register appropriate listeners based on environment
class AzListenerHelper : ListenerHelper
{
    static AzListenerHelper()
    {

     }

     static [void] RegisterListeners()
    {
        [ListenerHelper]:: RegisterListeners();
        [WriteCAStatus]::GetInstance().RegisterEvents();
        [AzResourceInventoryListener]::GetInstance().RegisterEvents();

    }

     static [void] UnregisterListeners()
    {
        [ListenerHelper]:: UnRegisterListeners();
        [WriteCAStatus]::GetInstance().UnRegisterEvents();
        [AzResourceInventoryListener]::GetInstance().UnRegisterEvents();
    }    
}