public CompositeType GetDataUsingDataContract(CompositeType composite) { Thread.Sleep(5000); if (composite == null) { throw new ArgumentNullException("composite"); } if (composite.BoolValue) { composite.StringValue += "Suffix"; } return composite; }
public async Task<CompositeType> GetDataUsingDataContractAsynCompositeType(CompositeType composite) { await Task.Factory.StartNew(() => Thread.Sleep(5000)); return composite; }