public void Prepare() { // Do not export empty arrays if (ChannelList.Count > 0) { channels = ChannelList.ToArray(); } if (SamplerList.Count > 0) { samplers = SamplerList.ToArray(); } }