public static CommandMessage Create(
int version,
long timestamp,
long stream_id,
string command_name,
int transaction_id,
AMFValue command_object,
params AMFValue[] arguments)
{
switch (version) {
case 0:
return new CommandAMF0Message(timestamp, stream_id, command_name, transaction_id, command_object, arguments);
case 3:
return new CommandAMF3Message(timestamp, stream_id, command_name, transaction_id, command_object, arguments);
default:
throw new ArgumentException("Unsupported serialize version", "version");
}
}