public override BinaryContent CreateBinaryContent(byte[] data) { DemoBinaryContent content = new DemoBinaryContent(this); lock (this.binaryContentCacheLocker) { MaxBinaryContentId++; content.Id = MaxBinaryContentId; BinaryContentCache.Add(content.Id, content); } content.Data = data; return(content); }
DemoBinaryContent CreateInitialBinaryContent(long id, byte[] data) { DemoBinaryContent content = new DemoBinaryContent(this); content.Id = id; if (data != null) { content.Data = data; } BinaryContentCache.Add(id, content); if (MaxBinaryContentId < id) { MaxBinaryContentId = id; } return(content); }