From 71f662c33e9938951eec3da97140aed25aa815d7 Mon Sep 17 00:00:00 2001 From: csharptest Date: Fri, 20 May 2011 15:15:34 -0500 Subject: reformatted all code to .NET standard formatting --- src/ProtocolBuffers/ThrowHelper.cs | 70 ++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 30 deletions(-) (limited to 'src/ProtocolBuffers/ThrowHelper.cs') 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 { - /// - /// Helper methods for throwing exceptions - /// - public static class ThrowHelper { - +namespace Google.ProtocolBuffers +{ /// - /// Throws an ArgumentNullException if the given value is null. + /// Helper methods for throwing exceptions /// - public static void ThrowIfNull(object value, string name) { - if (value == null) { - throw new ArgumentNullException(name); - } - } + public static class ThrowHelper + { + /// + /// Throws an ArgumentNullException if the given value is null. + /// + public static void ThrowIfNull(object value, string name) + { + if (value == null) + { + throw new ArgumentNullException(name); + } + } - /// - /// Throws an ArgumentNullException if the given value is null. - /// - public static void ThrowIfNull(object value) { - if (value == null) { - throw new ArgumentNullException(); - } - } + /// + /// Throws an ArgumentNullException if the given value is null. + /// + public static void ThrowIfNull(object value) + { + if (value == null) + { + throw new ArgumentNullException(); + } + } - /// - /// Throws an ArgumentNullException if the given value or any element within it is null. - /// - public static void ThrowIfAnyNull(IEnumerable sequence) { - foreach (T t in sequence) { - if (t == null) { - throw new ArgumentNullException(); + /// + /// Throws an ArgumentNullException if the given value or any element within it is null. + /// + public static void ThrowIfAnyNull(IEnumerable sequence) + { + foreach (T t in sequence) + { + if (t == null) + { + throw new ArgumentNullException(); + } + } } - } } - } -} +} \ No newline at end of file -- cgit v1.2.3