private void Write(EntityInstanceFunctionMethod method) { WriteSignature(method); using (_builder.IndentBraced) { WriteEntityMethodBodyStart(method); _("return ({0}) Enumerable.Single<{1}>(await this.Context.ExecuteAsync<{1}>(requestUri, \"{2}\", true, new OperationParameter[]", method.ReturnType.GenericParameters.First(), method.InstanceName, method.HttpMethod); using (_builder.IndentBraced) { WriteMethodOperationParameters(method); } _("));"); } }