Skip to content
This repository was archived by the owner on Dec 18, 2023. It is now read-only.

Commit 683ddcb

Browse files
Sergey KanzhelevSergey Kanzhelev
authored andcommitted
more stylecop whitespace edits
1 parent 5bf13ea commit 683ddcb

70 files changed

Lines changed: 242 additions & 176 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/OpenCensus/Impl/Common/Duration.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public override bool Equals(object o)
6363
return true;
6464
}
6565

66-
if (o is Duration) {
66+
if (o is Duration)
67+
{
6768
Duration that = (Duration)o;
6869
return (this.Seconds == that.Seconds)
6970
&& (this.Nanos == that.Nanos);

src/OpenCensus/Impl/Common/Timestamp.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private static ITimestamp OfSecond(long seconds, long nanoAdjustment)
102102
{
103103
long floor = (long)Math.Floor((double)nanoAdjustment / NANOS_PER_SECOND);
104104
long secs = seconds + floor;
105-
long nos = nanoAdjustment - floor * NANOS_PER_SECOND;
105+
long nos = nanoAdjustment - (floor * NANOS_PER_SECOND);
106106
return Create(secs, (int)nos);
107107
}
108108

@@ -121,7 +121,8 @@ public override bool Equals(object o)
121121
return true;
122122
}
123123

124-
if (o is Timestamp) {
124+
if (o is Timestamp)
125+
{
125126
Timestamp that = (Timestamp)o;
126127
return (this.Seconds == that.Seconds)
127128
&& (this.Nanos == that.Nanos);

src/OpenCensus/Impl/Internal/VarInt.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public static int VarIntSize(int i)
1919
{
2020
result++;
2121
ui = ui >> 7;
22-
} while (ui != 0);
22+
}
23+
while (ui != 0);
2324
return result;
2425
}
2526

@@ -40,7 +41,8 @@ public static int GetVarInt(byte[] src, int offset, int[] dst)
4041
b = src[offset++];
4142
result |= (b & 0x7F) << shift;
4243
shift += 7;
43-
} while ((b & 0x80) != 0);
44+
}
45+
while ((b & 0x80) != 0);
4446
dst[0] = result;
4547
return offset;
4648
}
@@ -55,7 +57,8 @@ public static int PutVarInt(int v, byte[] sink, int offset)
5557
uv >>= 7;
5658
byte b = (byte)(bits + ((uv != 0) ? 0x80 : 0));
5759
sink[offset++] = b;
58-
} while (uv != 0);
60+
}
61+
while (uv != 0);
5962
return offset;
6063
}
6164

@@ -139,7 +142,8 @@ public static int GetVarInt(Stream inputStream)
139142
b = inputStream.ReadByte();
140143
result |= (b & 0x7F) << shift;
141144
shift += 7;
142-
} while ((b & 0x80) != 0);
145+
}
146+
while ((b & 0x80) != 0);
143147
return result;
144148
}
145149

@@ -158,7 +162,8 @@ public static int VarLongSize(long v)
158162
{
159163
result++;
160164
uv >>= 7;
161-
} while (uv != 0);
165+
}
166+
while (uv != 0);
162167
return result;
163168
}
164169

src/OpenCensus/Impl/Stats/Aggregations/CountData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public override string ToString()
3636
+ "}";
3737
}
3838

39-
public override bool Equals(Object o)
39+
public override bool Equals(object o)
4040
{
4141
if (o == this)
4242
{

src/OpenCensus/Impl/Stats/Aggregations/Distribution.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public override bool Equals(object o)
4747
return true;
4848
}
4949

50-
if (o is Distribution) {
50+
if (o is Distribution)
51+
{
5152
Distribution that = (Distribution)o;
5253
return this.BucketBoundaries.Equals(that.BucketBoundaries);
5354
}

src/OpenCensus/Impl/Stats/Aggregations/DistributionData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public override M Match<M>(
6868
return p4.Invoke(this);
6969
}
7070

71-
public override String ToString()
71+
public override string ToString()
7272
{
7373
return "DistributionData{"
7474
+ "mean=" + Mean + ", "
@@ -80,7 +80,7 @@ public override String ToString()
8080
+ "}";
8181
}
8282

83-
public override bool Equals(Object o)
83+
public override bool Equals(object o)
8484
{
8585
if (o == this)
8686
{

src/OpenCensus/Impl/Stats/Aggregations/LastValue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public override string ToString()
2424
+ "}";
2525
}
2626

27-
public override bool Equals(Object o)
27+
public override bool Equals(object o)
2828
{
2929
if (o == this)
3030
{

src/OpenCensus/Impl/Stats/Aggregations/LastValueDataDouble.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public override string ToString()
2626
+ "}";
2727
}
2828

29-
public override bool Equals(Object o)
29+
public override bool Equals(object o)
3030
{
3131
if (o == this)
3232
{

src/OpenCensus/Impl/Stats/Aggregations/LastValueDataLong.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public override string ToString()
2525
+ "}";
2626
}
2727

28-
public override bool Equals(Object o)
28+
public override bool Equals(object o)
2929
{
3030
if (o == this)
3131
{

src/OpenCensus/Impl/Stats/Aggregations/Mean.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ public override M Match<M>(Func<ISum, M> p0, Func<ICount, M> p1, Func<IMean, M>
1818
return p2.Invoke(this);
1919
}
2020

21-
public override String ToString()
21+
public override string ToString()
2222
{
2323
return "Mean{"
2424
+ "}";
2525
}
2626

27-
public override bool Equals(Object o)
27+
public override bool Equals(object o)
2828
{
2929
if (o == this)
3030
{

0 commit comments

Comments
 (0)