public static void ParameterInitMiddleware(ref IMarshalContext ctx, Action next) { for (int index = 0; index < ctx.MethodSymbol.Parameters.Length; index++) { var symbol = ctx.MethodSymbol.Parameters[index]; var id = ctx.DeclareVariable(symbol.Type); ctx.SetVariable(id, _ => IdentifierName(FormatName(symbol.Name))); ctx.SetParameterToVariable(index, id); } ctx.TransitionTo(SilkTouchStage.PostInit); next(); }