Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    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);
    }