{
class Program
{
//Run it in debug mode
static void Main(string[] args)
{
Console.WriteLine("Client start...");
var channelFactory = new ChannelFactory<ITrading1>("ITradingBasicHttp");
//var channelFactory = new ChannelFactory<ITrading1>("ITradingWebService");
var trading = channelFactory.CreateChannel();
//ActionNotSupportedException, this method undefined in service contract
trading.Foo();
//Ok
trading.Foo1();
//Ok, but the service side gets null string
trading.Foo2();
//Ok, but service side gets only "y" parameter, x and z is initialized with
//zero value. Even first client and second service parameter matched by
//common ("y") name. It's work, great!
trading.Foo3(11 /*y*/, 22 /*var*/);
//System.NotSupportedException, this method is not marked with
//OperationContractAttribute in both client and service sides.
trading.Foo99();
Console.ReadLine();
}
}
}