private NativeExtension() { this.nativeMethods = LoadNativeMethods(); // Redirect the native logs as the very first thing after loading the native extension // to make sure we don't lose any logs. NativeLogRedirector.Redirect(this.nativeMethods); // Initialize NativeCallbackDispatcher.Init(this.nativeMethods); DefaultSslRootsOverride.Override(this.nativeMethods); Logger.Debug("gRPC native library loaded successfully."); }
public NativeMetadataCredentialsPlugin(AsyncAuthInterceptor interceptor) { this.interceptor = GrpcPreconditions.CheckNotNull(interceptor, "interceptor"); this.callbackRegistration = NativeCallbackDispatcher.RegisterCallback(HandleUniversalCallback); this.credentials = Native.grpcsharp_metadata_credentials_create_from_plugin(this.callbackRegistration.Tag); }
public VerifyPeerCallbackRegistration(VerifyPeerCallback verifyPeerCallback) { this.verifyPeerCallback = verifyPeerCallback; this.callbackRegistration = NativeCallbackDispatcher.RegisterCallback(HandleUniversalCallback); }