public CompositeType GetDataUsingDataContract(CompositeType composite) { if (composite != null && composite.BoolValue) { composite.StringValue += "Suffix"; } return composite; }
static void Main() { using (var client = new Service1Client()) { string s = client.GetData(123); var ct = new CompositeType { BoolValue = true, StringValue = s }; var resp = client.GetDataUsingDataContract(ct); } }