aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/Google.Protobuf/WellKnownTypes
diff options
context:
space:
mode:
authorGravatar Jon Skeet <jonskeet@google.com>2016-02-04 06:51:54 +0000
committerGravatar Jon Skeet <jonskeet@google.com>2016-02-04 14:50:43 +0000
commit7762f163a4150772be9a0eae3a285ff9b1eb3246 (patch)
treed5221ec9c489e6fc5c49460387273c3723862981 /csharp/src/Google.Protobuf/WellKnownTypes
parentc78222a366edf128e4361d32958dc96d0b4d89d8 (diff)
Rename Preconditions to ProtoPreconditions
(Generated code changes in next commit.)
Diffstat (limited to 'csharp/src/Google.Protobuf/WellKnownTypes')
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/AnyPartial.cs2
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/DurationPartial.cs10
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/TimestampPartial.cs12
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/ValuePartial.cs6
4 files changed, 15 insertions, 15 deletions
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/AnyPartial.cs b/csharp/src/Google.Protobuf/WellKnownTypes/AnyPartial.cs
index 082f7432..9d43856e 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/AnyPartial.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/AnyPartial.cs
@@ -72,7 +72,7 @@ namespace Google.Protobuf.WellKnownTypes
/// <returns>An Any message with the content and type URL of <paramref name="message"/>.</returns>
public static Any Pack(IMessage message)
{
- Preconditions.CheckNotNull(message, "message");
+ ProtoPreconditions.CheckNotNull(message, "message");
return new Any { TypeUrl = GetTypeUrl(message.Descriptor), Value = message.ToByteString() };
}
}
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/DurationPartial.cs b/csharp/src/Google.Protobuf/WellKnownTypes/DurationPartial.cs
index e5247e90..f164bfd1 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/DurationPartial.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/DurationPartial.cs
@@ -118,7 +118,7 @@ namespace Google.Protobuf.WellKnownTypes
/// <returns>The negated value of this duration.</returns>
public static Duration operator -(Duration value)
{
- Preconditions.CheckNotNull(value, "value");
+ ProtoPreconditions.CheckNotNull(value, "value");
checked
{
return Normalize(-value.Seconds, -value.Nanos);
@@ -133,8 +133,8 @@ namespace Google.Protobuf.WellKnownTypes
/// <returns></returns>
public static Duration operator +(Duration lhs, Duration rhs)
{
- Preconditions.CheckNotNull(lhs, "lhs");
- Preconditions.CheckNotNull(rhs, "rhs");
+ ProtoPreconditions.CheckNotNull(lhs, "lhs");
+ ProtoPreconditions.CheckNotNull(rhs, "rhs");
checked
{
return Normalize(lhs.Seconds + rhs.Seconds, lhs.Nanos + rhs.Nanos);
@@ -149,8 +149,8 @@ namespace Google.Protobuf.WellKnownTypes
/// <returns>The difference between the two specified durations.</returns>
public static Duration operator -(Duration lhs, Duration rhs)
{
- Preconditions.CheckNotNull(lhs, "lhs");
- Preconditions.CheckNotNull(rhs, "rhs");
+ ProtoPreconditions.CheckNotNull(lhs, "lhs");
+ ProtoPreconditions.CheckNotNull(rhs, "rhs");
checked
{
return Normalize(lhs.Seconds - rhs.Seconds, lhs.Nanos - rhs.Nanos);
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/TimestampPartial.cs b/csharp/src/Google.Protobuf/WellKnownTypes/TimestampPartial.cs
index 86998e27..aa403473 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/TimestampPartial.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/TimestampPartial.cs
@@ -59,8 +59,8 @@ namespace Google.Protobuf.WellKnownTypes
/// <returns>The difference between the two specified timestamps.</returns>
public static Duration operator -(Timestamp lhs, Timestamp rhs)
{
- Preconditions.CheckNotNull(lhs, "lhs");
- Preconditions.CheckNotNull(rhs, "rhs");
+ ProtoPreconditions.CheckNotNull(lhs, "lhs");
+ ProtoPreconditions.CheckNotNull(rhs, "rhs");
checked
{
return Duration.Normalize(lhs.Seconds - rhs.Seconds, lhs.Nanos - rhs.Nanos);
@@ -75,8 +75,8 @@ namespace Google.Protobuf.WellKnownTypes
/// <returns>The result of adding the duration to the timestamp.</returns>
public static Timestamp operator +(Timestamp lhs, Duration rhs)
{
- Preconditions.CheckNotNull(lhs, "lhs");
- Preconditions.CheckNotNull(rhs, "rhs");
+ ProtoPreconditions.CheckNotNull(lhs, "lhs");
+ ProtoPreconditions.CheckNotNull(rhs, "rhs");
checked
{
return Normalize(lhs.Seconds + rhs.Seconds, lhs.Nanos + rhs.Nanos);
@@ -91,8 +91,8 @@ namespace Google.Protobuf.WellKnownTypes
/// <returns>The result of subtracting the duration from the timestamp.</returns>
public static Timestamp operator -(Timestamp lhs, Duration rhs)
{
- Preconditions.CheckNotNull(lhs, "lhs");
- Preconditions.CheckNotNull(rhs, "rhs");
+ ProtoPreconditions.CheckNotNull(lhs, "lhs");
+ ProtoPreconditions.CheckNotNull(rhs, "rhs");
checked
{
return Normalize(lhs.Seconds - rhs.Seconds, lhs.Nanos - rhs.Nanos);
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/ValuePartial.cs b/csharp/src/Google.Protobuf/WellKnownTypes/ValuePartial.cs
index b4b6c05e..d34b560d 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/ValuePartial.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/ValuePartial.cs
@@ -41,7 +41,7 @@ namespace Google.Protobuf.WellKnownTypes
/// <returns>A newly-created Value message with the given value.</returns>
public static Value ForString(string value)
{
- Preconditions.CheckNotNull(value, "value");
+ ProtoPreconditions.CheckNotNull(value, "value");
return new Value { StringValue = value };
}
@@ -81,7 +81,7 @@ namespace Google.Protobuf.WellKnownTypes
/// <returns>A newly-created Value message an initial list value.</returns>
public static Value ForList(params Value[] values)
{
- Preconditions.CheckNotNull(values, "values");
+ ProtoPreconditions.CheckNotNull(values, "values");
return new Value { ListValue = new ListValue { Values = { values } } };
}
@@ -92,7 +92,7 @@ namespace Google.Protobuf.WellKnownTypes
/// <returns>A newly-created Value message an initial struct value.</returns>
public static Value ForStruct(Struct value)
{
- Preconditions.CheckNotNull(value, "value");
+ ProtoPreconditions.CheckNotNull(value, "value");
return new Value { StructValue = value };
}
}