diff options
author | csharptest <roger@csharptest.net> | 2011-09-16 12:21:00 -0500 |
---|---|---|
committer | rogerk <devnull@localhost> | 2011-09-16 12:21:00 -0500 |
commit | 4ecebd8b4a34c1f902176395024185f1724cb2eb (patch) | |
tree | b66dbd1ef1b8fc8f4b4813f4ac7522fc25d637dc /src/ProtocolBuffers/GeneratedBuilderLite.cs | |
parent | 8f0dcf3df1548a1eff0bed54a9b992f55b8f72d5 (diff) | |
download | protobuf-4ecebd8b4a34c1f902176395024185f1724cb2eb.tar.gz protobuf-4ecebd8b4a34c1f902176395024185f1724cb2eb.tar.bz2 protobuf-4ecebd8b4a34c1f902176395024185f1724cb2eb.zip |
Tests and fixes for double-enumeration on AddRange and adding of null to PopsicleList
Diffstat (limited to 'src/ProtocolBuffers/GeneratedBuilderLite.cs')
-rw-r--r-- | src/ProtocolBuffers/GeneratedBuilderLite.cs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/ProtocolBuffers/GeneratedBuilderLite.cs b/src/ProtocolBuffers/GeneratedBuilderLite.cs index cd2b8395..168f596a 100644 --- a/src/ProtocolBuffers/GeneratedBuilderLite.cs +++ b/src/ProtocolBuffers/GeneratedBuilderLite.cs @@ -67,32 +67,6 @@ namespace Google.ProtocolBuffers }
/// <summary>
- /// Adds all of the specified values to the given collection.
- /// </summary>
- /// <exception cref="ArgumentNullException">Any element of the list is null</exception>
- protected void AddRange<T>(IEnumerable<T> source, IList<T> destination)
- {
- ThrowHelper.ThrowIfNull(source);
- // We only need to check this for nullable types.
- if (default(T) == null)
- {
- ThrowHelper.ThrowIfAnyNull(source);
- }
- List<T> list = destination as List<T>;
- if (list != null)
- {
- list.AddRange(source);
- }
- else
- {
- foreach (T element in source)
- {
- destination.Add(element);
- }
- }
- }
-
- /// <summary>
/// Called by derived classes to parse an unknown field.
/// </summary>
/// <returns>true unless the tag is an end-group tag</returns>
|