Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class ServiceClient
- {
- public ServiceClient(string address, int port) { }
- public IEnumerable<string>ProcessRequests( IEnumerable<string> next )
- {
- foreach (var req in next)
- {
- yield return req + " Done";
- }
- }
- }
- class Program
- {
- static IEnumerable<string> GenerateRequest()
- {
- for (int i = 0; i < 20; i++)
- {
- yield return string.Format( "get_user({0})", i );
- }
- }
- static void Main(string[] args)
- {
- var client = new ServiceClient("", 0);
- foreach (var s in client.ProcessRequests( GenerateRequest() ))
- {
- System.Console.WriteLine(s);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment