diff options
author | Jon Skeet <jonskeet@google.com> | 2015-07-22 11:38:22 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-07-22 11:38:22 +0100 |
commit | 4668c3dc3921e157b7904e26a1ddd84287b881be (patch) | |
tree | 755b120ba988871c074454bc6b2a829d86fdd1e7 /csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs | |
parent | 8d115298c7fc6fec135515ff7ddacb7f1524149e (diff) | |
download | protobuf-4668c3dc3921e157b7904e26a1ddd84287b881be.tar.gz protobuf-4668c3dc3921e157b7904e26a1ddd84287b881be.tar.bz2 protobuf-4668c3dc3921e157b7904e26a1ddd84287b881be.zip |
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.cs | 21 |
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 |