static CodePropertyReference GetOperationMethod (CodeMethod m, CodeBuilder b, string name, string methodPropertyName)
{
return new CodePropertyReference (
b.CallFunc (
// this.Contract.Operations
new CodePropertyReference (
new CodePropertyReference (
m.GetThis (),
typeof (ClientRuntimeChannel).GetProperty ("Contract")),
typeof (ContractDescription).GetProperty ("Operations")),
// .Find (name)
typeof (OperationDescriptionCollection).GetMethod ("Find"),
new CodeLiteral (name)),
// .SyncMethod
typeof (OperationDescription).GetProperty (methodPropertyName));
}