From 4668c3dc3921e157b7904e26a1ddd84287b881be Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Wed, 22 Jul 2015 11:38:22 +0100 Subject: 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. --- .../Google.Protobuf/Reflection/ReflectionUtil.cs | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs') 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>(call, targetParameter).Compile(); - } - - /// - /// Returns the next type from an iterator of types, unless the iterator is a null reference, - /// in which case null is returned. - /// - internal static Type GetNextType(IEnumerator 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 -- cgit v1.2.3