/// <summary> /// Creates a new coder. /// </summary> public Coder(RouterDb routerDb, CoderProfile profile, Codecs.CodecBase rawCodec) { _router = new Router(routerDb); _rawCodec = rawCodec; _profile = profile; if (!_router.SupportsAll(profile.Profile)) { throw new ArgumentException("The router db does not support the profile in the coder profile. Are you using the correct vehicle profile?"); } }
/// <summary> /// Creates a new coder with a default binary codec. /// </summary> /// <param name="routerDb"></param> /// <param name="profile"></param> public Coder(RouterDb routerDb, CoderProfile profile) : this(routerDb, profile, new Codecs.Binary.BinaryCodec()) { }