Apis.Get<...> returns null

I created simple plugin with configuration like that:

https://community.telligent.com/community/10/w/developer-training/53308/exposing-configuration-options

and added several calls from Initialize, ConfigurationOptions and Update to the Apis.Get:

public void Update(IPluginConfiguration configuration) {
            _configuration = configuration;

            ApiList<NotificationDistributionTypeInfo> apiList = Apis.Get<INotifications>().ListDistributionTypes();
            infoOptions = new EventLogEntryWriteOptions() {Category = category, EventType = "Information"};
            Apis.Get<EventLog>().Write("zzz", infoOptions);
            
        }

but in logs I see exceptions like System.NullReferenceException pointed to that lines.

I don't understand a logic. Sometimes that exceptions appear, sometimes - not, on different calls. 

Maybe community can help?

PS IIS restart, PC restart didn't help.

Parents Reply Children