Skip to content

Commit 6f9e744

Browse files
author
Emile Joubert
committed
Undo unnecessary apigen change
1 parent 8ff507e commit 6f9e744

File tree

1 file changed

+15
-24
lines changed

1 file changed

+15
-24
lines changed

projects/client/Apigen/src/apigen/Apigen.cs

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,35 +1134,26 @@ public void EmitAsynchronousHandlers(ArrayList asynchronousHandlers) {
11341134
string implClass = MangleMethodClass(amqpClass, amqpMethod);
11351135

11361136
EmitLine(" case "+((amqpClass.Index << 16) | amqpMethod.Index)+": {");
1137-
ParameterInfo[] parameters = method.GetParameters();
1137+
ParameterInfo[] parameters = method.GetParameters();
11381138
if (parameters.Length > 0) {
1139-
EmitLine(" "+implClass+" __impl = ("+implClass+") __method;");
1139+
EmitLine(" "+implClass+" __impl = ("+implClass+") __method;");
11401140
EmitLine(" "+method.Name+"(");
11411141
int remaining = parameters.Length;
11421142
foreach (ParameterInfo pi in parameters) {
1143+
if (Attribute(pi, typeof(AmqpContentHeaderMappingAttribute)) != null) {
1144+
Emit(" ("+pi.ParameterType+") cmd.Header");
1145+
} else if (Attribute(pi, typeof(AmqpContentBodyMappingAttribute)) != null) {
1146+
Emit(" cmd.Body");
1147+
} else {
1148+
AmqpFieldMappingAttribute fieldMapping =
1149+
Attribute(pi, typeof(AmqpFieldMappingAttribute)) as AmqpFieldMappingAttribute;
1150+
Emit(" __impl.m_"+(fieldMapping == null
1151+
? pi.Name
1152+
: fieldMapping.m_fieldName));
1153+
}
11431154
remaining--;
1144-
if (Attribute(pi, typeof(AmqpUnsupportedAttribute)) == null)
1145-
{
1146-
if (Attribute(pi, typeof(AmqpContentHeaderMappingAttribute)) != null)
1147-
{
1148-
Emit(" (" + pi.ParameterType + ") cmd.Header");
1149-
}
1150-
else if (Attribute(pi, typeof(AmqpContentBodyMappingAttribute)) != null)
1151-
{
1152-
Emit(" cmd.Body");
1153-
}
1154-
else
1155-
{
1156-
AmqpFieldMappingAttribute fieldMapping =
1157-
Attribute(pi, typeof(AmqpFieldMappingAttribute)) as AmqpFieldMappingAttribute;
1158-
Emit(" __impl.m_" + (fieldMapping == null
1159-
? pi.Name
1160-
: fieldMapping.m_fieldName));
1161-
}
1162-
if (remaining > 0)
1163-
{
1164-
EmitLine(",");
1165-
}
1155+
if (remaining > 0) {
1156+
EmitLine(",");
11661157
}
11671158
}
11681159
EmitLine(");");

0 commit comments

Comments
 (0)