protected ITransfer trans = null; // Current transfer where this protocol is used protected virtual byte[] GetContent(System.Text.Encoding encoding, long start, long length) { Share share = trans.Share; Containers.ContentInfo info = trans.Content; if (share != null && share.ContainsContent(ref info)) { trans.Content = info; if (length == -1 && start == 0) { trans.CurrentSegment.Length = length = trans.Content.Size; } return(share.GetContent(trans.Content, start, length)); } return(null); }