public MessageDescript(TemplateCommand commandTemplate, byte commandByte, string message, byte[] buffer, byte bufferSize) { Tempate = commandTemplate; CommandByte = commandByte; Message = message; Buffer = buffer; BufferSize = bufferSize; }
public bool TryAddCommand(TemplateCommand templateCommand, byte indexCommand) { if (commands.ContainsKey(templateCommand) || commands.ContainsValue(indexCommand)) { return(false); } commands.Add(templateCommand, indexCommand); return(true); }