aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers/ThrowHelper.cs
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2011-05-20 15:15:34 -0500
committerrogerk <devnull@localhost>2011-05-20 15:15:34 -0500
commit71f662c33e9938951eec3da97140aed25aa815d7 (patch)
treec322e13686cad5c8bff9e54d7585fc8e4adf6537 /src/ProtocolBuffers/ThrowHelper.cs
parentd965c666ecf405f4e997ab251e72551508a14678 (diff)
downloadprotobuf-71f662c33e9938951eec3da97140aed25aa815d7.tar.gz
protobuf-71f662c33e9938951eec3da97140aed25aa815d7.tar.bz2
protobuf-71f662c33e9938951eec3da97140aed25aa815d7.zip
reformatted all code to .NET standard formatting
Diffstat (limited to 'src/ProtocolBuffers/ThrowHelper.cs')
-rw-r--r--src/ProtocolBuffers/ThrowHelper.cs70
1 files changed, 40 insertions, 30 deletions
diff --git a/src/ProtocolBuffers/ThrowHelper.cs b/src/ProtocolBuffers/ThrowHelper.cs
index 580024db..c854a777 100644
--- a/src/ProtocolBuffers/ThrowHelper.cs
+++ b/src/ProtocolBuffers/ThrowHelper.cs
@@ -1,4 +1,5 @@
#region Copyright notice and license
+
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// http://github.com/jskeet/dotnet-protobufs/
@@ -30,44 +31,53 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
#endregion
using System;
using System.Collections.Generic;
-namespace Google.ProtocolBuffers {
- /// <summary>
- /// Helper methods for throwing exceptions
- /// </summary>
- public static class ThrowHelper {
-
+namespace Google.ProtocolBuffers
+{
/// <summary>
- /// Throws an ArgumentNullException if the given value is null.
+ /// Helper methods for throwing exceptions
/// </summary>
- public static void ThrowIfNull(object value, string name) {
- if (value == null) {
- throw new ArgumentNullException(name);
- }
- }
+ public static class ThrowHelper
+ {
+ /// <summary>
+ /// Throws an ArgumentNullException if the given value is null.
+ /// </summary>
+ public static void ThrowIfNull(object value, string name)
+ {
+ if (value == null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
- /// <summary>
- /// Throws an ArgumentNullException if the given value is null.
- /// </summary>
- public static void ThrowIfNull(object value) {
- if (value == null) {
- throw new ArgumentNullException();
- }
- }
+ /// <summary>
+ /// Throws an ArgumentNullException if the given value is null.
+ /// </summary>
+ public static void ThrowIfNull(object value)
+ {
+ if (value == null)
+ {
+ throw new ArgumentNullException();
+ }
+ }
- /// <summary>
- /// Throws an ArgumentNullException if the given value or any element within it is null.
- /// </summary>
- public static void ThrowIfAnyNull<T>(IEnumerable<T> sequence) {
- foreach (T t in sequence) {
- if (t == null) {
- throw new ArgumentNullException();
+ /// <summary>
+ /// Throws an ArgumentNullException if the given value or any element within it is null.
+ /// </summary>
+ public static void ThrowIfAnyNull<T>(IEnumerable<T> sequence)
+ {
+ foreach (T t in sequence)
+ {
+ if (t == null)
+ {
+ throw new ArgumentNullException();
+ }
+ }
}
- }
}
- }
-}
+} \ No newline at end of file