public Either <RfcErrorInfo, IConnectionHandle> OpenConnection(IDictionary <string, string> connectionParams) { var loggedParams = new Dictionary <string, string>(connectionParams); // ReSharper disable StringLiteralTypo if (loggedParams.ContainsKey("passwd")) { loggedParams["passwd"] = "XXXX"; } // ReSharper restore StringLiteralTypo Logger.IfSome(l => l.LogTrace("Opening connection", loggedParams)); IConnectionHandle handle = NativeApi.OpenConnection(connectionParams, out var errorInfo); return(ResultOrError(handle, errorInfo, true)); }