public ExpectedMid IdentifyMid <ExpectedMid>(string package) where ExpectedMid : MID
        {
            MID mid = this.IdentifyMid(package);

            if (mid.GetType().Equals(typeof(ExpectedMid)))
            {
                return((ExpectedMid)mid);
            }

            throw new InvalidCastException($"Package is MID {mid.GetType().Name}, cannot be casted to {typeof(ExpectedMid).Name}");
        }
 internal void setNextTemplate(MID mid)
 {
     this.nextTemplate = mid;
 }