I've been tasked with implementing a web service method that can be used for many different things(read: no requirements exist) and any client's won't have to change the interface Here's what the method is supposed to look like
[DataContract]
public class Status
{
[DataMember(Order = 0)]
public long Code
{
get;
set;
}
[DataMember(Order = 1)]
public string Message
{
get;
set;
}
}
[DataContract]
public class Data
{
[DataMember(Order = 0)]
public string Name
{
get;
set;
}
[DataMember(Order = 1)]
public string Value
{
get;
set;
}
}
public Status InitiateTransaction(long txnTypeId, Data [] txnData);
The idea is that the client would pass different things in the data array based on what type of "transaction" they want to initiate. What would be the benefit of this over just creating a bunch of different specialized methods that do specific things?