You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by bl...@apache.org on 2020/04/01 20:21:09 UTC
[pulsar-dotpulsar] branch master updated: Minor refactoring
This is an automated email from the ASF dual-hosted git repository.
blankensteiner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-dotpulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 5776643 Minor refactoring
5776643 is described below
commit 5776643433c14ea260ea9db123b3c015e20efc04
Author: Daniel Blankensteiner <db...@vmail.dk>
AuthorDate: Wed Apr 1 22:20:52 2020 +0200
Minor refactoring
---
src/DotPulsar/Internal/Connector.cs | 7 +++++--
src/DotPulsar/Internal/Process.cs | 8 ++++----
src/DotPulsar/MessageMetadata.cs | 6 +++---
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/DotPulsar/Internal/Connector.cs b/src/DotPulsar/Internal/Connector.cs
index 515347e..18d45b1 100644
--- a/src/DotPulsar/Internal/Connector.cs
+++ b/src/DotPulsar/Internal/Connector.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -30,7 +30,10 @@ namespace DotPulsar.Internal
private readonly bool _verifyCertificateAuthority;
private readonly bool _verifyCertificateName;
- public Connector(X509Certificate2Collection clientCertificates, X509Certificate2? trustedCertificateAuthority, bool verifyCertificateAuthority,
+ public Connector(
+ X509Certificate2Collection clientCertificates,
+ X509Certificate2? trustedCertificateAuthority,
+ bool verifyCertificateAuthority,
bool verifyCertificateName)
{
_clientCertificates = clientCertificates;
diff --git a/src/DotPulsar/Internal/Process.cs b/src/DotPulsar/Internal/Process.cs
index 28299b9..7e18dfc 100644
--- a/src/DotPulsar/Internal/Process.cs
+++ b/src/DotPulsar/Internal/Process.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -22,13 +22,13 @@ namespace DotPulsar.Internal
{
public abstract class Process : IProcess
{
- protected readonly CancellationTokenSource CancellationTokenSource = new CancellationTokenSource();
-
+ protected readonly CancellationTokenSource CancellationTokenSource;
protected ChannelState ChannelState;
protected ExecutorState ExecutorState;
- public Process(Guid correlationId)
+ protected Process(Guid correlationId)
{
+ CancellationTokenSource = new CancellationTokenSource();
ChannelState = ChannelState.Disconnected;
ExecutorState = ExecutorState.Ok;
CorrelationId = correlationId;
diff --git a/src/DotPulsar/MessageMetadata.cs b/src/DotPulsar/MessageMetadata.cs
index 46421b1..aa826a2 100644
--- a/src/DotPulsar/MessageMetadata.cs
+++ b/src/DotPulsar/MessageMetadata.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -71,7 +71,7 @@ namespace DotPulsar
{
get
{
- for (var i = 0; i < Metadata.Properties.Count; i++)
+ for (var i = 0; i < Metadata.Properties.Count; ++i)
{
var prop = Metadata.Properties[i];
@@ -83,7 +83,7 @@ namespace DotPulsar
}
set
{
- for (var i = 0; i < Metadata.Properties.Count; i++)
+ for (var i = 0; i < Metadata.Properties.Count; ++i)
{
var prop = Metadata.Properties[i];