public void WriteMedia(DataPart part) { using (Stream s = part.GetStream(FileMode.Create, FileAccess.ReadWrite)) s.Write(Media, 0, Media.GetUpperBound(0) + 1); }
public MediaData(DataPart part) { ContentType = part.ContentType; using (Stream s = part.GetStream(FileMode.Open, FileAccess.Read)) { Media = new byte[s.Length]; s.Read(Media, 0, (int)s.Length); } }