uration= mexBehavior gt;
lt; endpoint address= ParsingService binding= basicHttpBinding contract= ParsingService.IParsingService gt; lt;/endpoint gt;
lt; endpoint address= ParsingService binding= netTcpBinding contract= ParsingService.IParsingService gt; lt;/endpoint gt;
lt; endpoint address= mex binding= mexHttpBinding contract= IMetadataExchange gt; lt;/endpoint gt;
lt; host gt;
lt; baseAddresses gt;
lt; add baseAddress= # justify gt; lt; add baseAddress= net.tcp://localhost: +9002/ParsingService"/ gt;
lt;/baseAddresses gt;
lt;/host gt;
lt;/service gt;
lt;/services gt;
lt; behaviors gt;
lt; serviceBehaviors gt;
lt; behavior name= mexBehavior gt;
lt; serviceMetadata httpGetEnabled= true / gt;
lt;/behavior gt;
lt;/serviceBehaviors gt;
lt;/behaviors gt;
lt; /system.serviceModelgt;
lt;/configurationgt;.csSystem;System.Collections.Generic;System.ComponentModel;System.Data;System.Drawing;System.Linq;System.Text;System.Threading.Tasks;System.Windows.Forms;ParserClient.ParserService;ParserClient
{partial class FormMain: Form
{_ client; List lt; string gt; _bankUrls=new List lt; string gt; ()
{
laquo;#raquo;justifylaquo;gt;raquo;#laquo;justifyraquo;gt;laquo;#raquo;justifylaquo;gt;raquo;#laquo;justifyraquo;gt;laquo;#raquo;justifylaquo;gt;raquo;#laquo;justifyraquo;gt;laquo;#raquo;justifylaquo;gt;raquo;#laquo;justifyraquo;gt;laquo;#raquo;justifylaquo;gt;raquo;#laquo;justifyraquo;gt;laquo;#raquo;justifylaquo;gt;raquo;#laquo;justifyraquo;gt;laquo;#raquo;justify"gt;};FormMain()
{();
_ client=new ParsingServiceClient ( BasicHttpBinding_IParsingService );
} void btn_Parse_Click (object sender, EventArgs e)
{
//Парс вказаний масив url адрес і отримуємо масив банков.конвертіровалі в список lt; Bank gt; banks=_client.ParseThePages (_bankUrls.ToArray lt; string gt; ()). ToList lt; Bank gt; ();
//обраховане кількість рядків табліци_ExchangeRate.RowCount=banks.Count;
//заповнюємо таблицю інформацією про банках (banks);
} void FillTheDataGridView (List lt; Bank gt; banks)
{(int i=0; i lt; dgv_ExchangeRate.RowCount; i ++)
{_ ExchangeRate [0, i] .Value=banks [i] .Name; _ExchangeRate [1, i] .Value=banks [i] .UsdBuy; _ExchangeRate [2, i] .Value= banks [i] .UsdSale; _ExchangeRate [3, i] .Value=banks [i] .EurBuy; _ExchangeRate [4, i] .Value=banks [i] .EurSale; _ExchangeRate [5, i] .Value=banks [ i] .RubBuy; _ExchangeRate [6, i] .Value=banks [i] .RubSale;
}
}
}
}.csSystem;System.Collections.Generic;System.ComponentModel;System.Data;System.Diagnostics;System.Linq;System.ServiceModel;System.ServiceModel.Description;System.ServiceProcess;System.Text;System.Threading.Tasks;WinParsingService
{partial class MyParsingService: ServiceBase
{ServiceHost _host=null; MyParsingService ()
{();
} override void OnStart (string [] args)
{(_ host!=null)
_ host.Close ();
_ host=new ServiceHost (typeof (ParsingService.ParsingService));
_ host.Open ();
}
override void OnStop ()
{(_ host!=null)
{
_ host.Close ();
_ host=null;
}
}
}
}. Designer.csWinParsingService
{class MyParsingService
{
/// lt; summary gt;
/// Required designer variable.
/// lt;/summary gt; System.ComponentModel.IContainer components=null;
/// lt; summary gt;
/// Clean up any resources being used.
/// lt;/summary gt;
/// lt; param name= disposing gt; true if managed resources should be dispos...