public void Run(IBackgroundTaskInstance taskInstance) { var deferral = taskInstance.GetDeferral(); _toyVpnPlugin = _toyVpnPlugin ?? new ToyVpnPlugin(); VpnChannel.ProcessEventAsync(_toyVpnPlugin, taskInstance.TriggerDetails); deferral.Complete(); }
public static IVpnPlugIn GetPlugin() { if (_pluginInstance == null) { lock (_pluginLocker) { if (_pluginInstance != null) { return(_pluginInstance); } _pluginInstance = new VpnPlugin(); } } return(_pluginInstance); }