aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffers/Collections/RepeatedFieldExtensions.cs
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2015-06-28 21:53:16 +0100
committerJon Skeet <skeet@pobox.com>2015-06-28 21:53:16 +0100
commitb08b6bf62e5f0398609cc95a34699df500ea110c (patch)
tree430514e0a7f98dd195d720e2a90a9f3183808fb7 /csharp/src/ProtocolBuffers/Collections/RepeatedFieldExtensions.cs
parent6b01539dfc1b4d4cefadc4cfdc79ff17293b84be (diff)
parentfb77cc9d9f066a8ce4f12e8d5f76188d48101444 (diff)
downloadprotobuf-b08b6bf62e5f0398609cc95a34699df500ea110c.tar.gz
protobuf-b08b6bf62e5f0398609cc95a34699df500ea110c.tar.bz2
protobuf-b08b6bf62e5f0398609cc95a34699df500ea110c.zip
Merge pull request #544 from jskeet/csharp-cleanup
Clean up C# code
Diffstat (limited to 'csharp/src/ProtocolBuffers/Collections/RepeatedFieldExtensions.cs')
-rw-r--r--csharp/src/ProtocolBuffers/Collections/RepeatedFieldExtensions.cs47
1 files changed, 0 insertions, 47 deletions
diff --git a/csharp/src/ProtocolBuffers/Collections/RepeatedFieldExtensions.cs b/csharp/src/ProtocolBuffers/Collections/RepeatedFieldExtensions.cs
deleted file mode 100644
index c5a934a1..00000000
--- a/csharp/src/ProtocolBuffers/Collections/RepeatedFieldExtensions.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Google.Protobuf.Collections
-{
- public static class RepeatedFieldExtensions
- {
- internal static uint CalculateSize<T>(this RepeatedField<T> list, Func<T, int> sizeComputer)
- {
- int size = 0;
- foreach (var item in list)
- {
- size += sizeComputer(item);
- }
- return (uint)size;
- }
-
- /*
- /// <summary>
- /// Calculates the serialized data size, including one tag per value.
- /// </summary>
- public static int CalculateTotalSize<T>(this RepeatedField<T> list, int tagSize, Func<T, int> sizeComputer)
- {
- if (list.Count == 0)
- {
- return 0;
- }
- return (int)(dataSize + tagSize * list.Count);
- }
-
- /// <summary>
- /// Calculates the serialized data size, as a packed array (tag, length, data).
- /// </summary>
- public static int CalculateTotalPackedSize(int tagSize)
- {
- if (Count == 0)
- {
- return 0;
- }
- uint dataSize = CalculateSize();
- return tagSize + CodedOutputStream.ComputeRawVarint32Size(dataSize) + (int)dataSize;
- }
- */
- }
-}