本文整理汇总了C#中Service1Client.GetDataUsingDataContract方法的典型用法代码示例。如果您正苦于以下问题:C# Service1Client.GetDataUsingDataContract方法的具体用法?C# Service1Client.GetDataUsingDataContract怎么用?C# Service1Client.GetDataUsingDataContract使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Service1Client
的用法示例。
在下文中一共展示了Service1Client.GetDataUsingDataContract方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestSync
public void TestSync()
{
using (Service1Client proxy = new Service1Client())
{
proxy.GetDataUsingDataContract(new CompositeType());
}
}
示例2: Main
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);
}
}
示例3: Main
static void Main(string[] args)
{
Service1Client client = new Service1Client();
Console.WriteLine(client.GetData(10));
Console.ReadLine();
CompositeType ct = new CompositeType();
ct.BoolValue = true;
ct.StringValue = "Karen ";
ct=client.GetDataUsingDataContract(ct);
Console.WriteLine(ct.StringValue);
Console.ReadLine();
client.Close();
}
示例4: Main
static void Main(string[] args)
{
try
{
Service1Client srv = new Service1Client();
var contact = srv.GetDataUsingDataContract(new CompositeType() { BoolValue = true, StringValue = "xxx" });
Console.WriteLine(contact.StringValue);
srv.Close();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
示例5: Main
private static void Main(string[] args)
{
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
int nroVueltas = 10;
for (int i = 0; i < nroVueltas; i++)
{
try
{
using (Service1Client proxy = new Service1Client())
{
proxy.GetDataUsingDataContract(new CompositeType());
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
TimeSpan ts = stopWatch.Elapsed;
Console.WriteLine("Sync Tiempo:{0}", ts.TotalMilliseconds);
for (int i = 0; i < nroVueltas; i++)
{
try
{
using (Service1Client proxy = new Service1Client())
{
proxy.GetDataUsingDataContractAsync(new CompositeType());
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
TimeSpan tsAsync = stopWatch.Elapsed;
Console.WriteLine("Async Tiempo:{0}", tsAsync.TotalMilliseconds);
Console.ReadLine();
}
示例6: ASPxButton1_Click
protected void ASPxButton1_Click(object sender, EventArgs e)
{
var sc = new Service1Client();
var result = sc.GetDataUsingDataContract(new CompositeType() { BoolValue = true, StringValue = "abc" });
Response.Write(result.StringValue);
}
示例7: Form1_Load
private void Form1_Load(object sender, EventArgs e)
{
IService1 x = new Service1Client();
x.GetDataUsingDataContract(new CompositeType());
}