public void Init()
{
foreach (BootstrapInfo b in BootstrapInfos)
{
MemoryStream ms=new MemoryStream(Convert.FromBase64String(b.Text));
BoxReader reader=new BoxReader(ms);
b.Info=new BootStrap();
string name;
reader.ReadHeader(out name);
reader.ReadBootStrap(b.Info);
reader.Dispose();
}
foreach (Media m in Medias)
{
MemoryStream ms=new MemoryStream(Convert.FromBase64String(m.Metadata));
AmfReader reader=new AmfReader(ms);
m.MetadataInfo = reader.ReadObject<Metadata>();
reader.Dispose();
m.Info = BootstrapInfos.First(a => a.Id == m.BootstrapInfoId);
}
}