private static string[] TranslateTypeFormals <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly>(Microsoft.Research.DataStructures.IIndexable <Type> types, IOutput output, IDecodeMetaData <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly> mdDecoder)
        {
            var formals = new string[types.Count];

            for (int i = 0; i < types.Count; i++)
            {
                formals[i] = mdDecoder.Name(types[i]);
            }
            return(formals);
        }
 private static TypeName[] Translate <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly>(Microsoft.Research.DataStructures.IIndexable <Type> types, IOutput output, IDecodeMetaData <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly> mdDecoder)
 {
     TypeName[] result = new TypeName[types.Count];
     for (int i = 0; i < types.Count; i++)
     {
         result[i] = TranslateToTypeName(types[i], output, mdDecoder);
     }
     return(result);
 }
        private static ParameterDefinitionName[] Translate <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly>(Microsoft.Research.DataStructures.IIndexable <Parameter> parameters, Method method, IOutput output, IDecodeMetaData <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly> mdDecoder)
        {
            int count = parameters.Count + (mdDecoder.IsStatic(method) ? 0 : 1);

            ParameterDefinitionName[] result = new ParameterDefinitionName[count];

            int i = 0;

            if (!mdDecoder.IsStatic(method))
            {
                result[i++] = Translate(mdDecoder.This(method), i, true, output, mdDecoder);
            }
            for (int j = 0; j < parameters.Count; j++)
            {
                Parameter p = parameters[j];
                result[i++] = Translate(p, i, false, output, mdDecoder);
            }
            return(result);
        }