public void Dispose()
 {
     if (_handlerToken != IntPtr.Zero)
     {
         _callbackHolder.Dispose();
         _agentLibrary.DestroyDataHandler(_handlerToken);
         _handlerToken = IntPtr.Zero;
     }
 }
 public void Dispose()
 {
     NativeMethods.DataHandlerRouter.Destroy(_nativeDataHandler);
     _handlePackageCallback.Dispose();
 }