aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs
diff options
context:
space:
mode:
authorGravatar Jon Skeet <jonskeet@google.com>2015-07-22 11:38:22 +0100
committerGravatar Jon Skeet <jonskeet@google.com>2015-07-22 11:38:22 +0100
commit4668c3dc3921e157b7904e26a1ddd84287b881be (patch)
tree755b120ba988871c074454bc6b2a829d86fdd1e7 /csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs
parent8d115298c7fc6fec135515ff7ddacb7f1524149e (diff)
Remove the usage of attributes for field/method discovery.
Instead, introduce GeneratedCodeInfo which passes in what we need, and adjust the codegen to take account of this.
Diffstat (limited to 'csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs')
-rw-r--r--csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs21
1 files changed, 1 insertions, 20 deletions
diff --git a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs
index ec222dc1..5b3cbb36 100644
--- a/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs
+++ b/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs
@@ -102,25 +102,6 @@ namespace Google.Protobuf.Reflection
Expression castTarget = Expression.Convert(targetParameter, method.DeclaringType);
Expression call = Expression.Call(castTarget, method);
return Expression.Lambda<Action<object>>(call, targetParameter).Compile();
- }
-
- /// <summary>
- /// Returns the next type from an iterator of types, unless the iterator is a null reference,
- /// in which case null is returned.
- /// </summary>
- internal static Type GetNextType(IEnumerator<Type> generatedTypeIterator)
- {
- if (generatedTypeIterator == null)
- {
- return null;
- }
- if (!generatedTypeIterator.MoveNext())
- {
- // This parameter name corresponds to any public method supplying the generated types to start with.
- throw new ArgumentException("More generated types left over after consuming all expected ones", "generatedTypes");
- }
- return generatedTypeIterator.Current;
- }
-
+ }
}
} \ No newline at end of file