Beispiel #1
0
        public IDictionary SetContentDictionaryValues(IDictionary data, DalcFileContent content)
        {
            var res = SetValues(data, content, FileContentMap);

            res[FileContentMap["Stream"]] = ((MemoryStream)content.GetStream(FileAccess.Read)).ToArray();
            return(res);
        }
Beispiel #2
0
        public DalcFileContent SetContentProperties(DalcFileContent content, IDictionary data)
        {
            var res     = (DalcFileContent)SetProperties(content, data, FileContentMap);
            var dataBuf = (data[FileContentMap["Stream"]] as byte[]) ?? new byte[0];

            content.GetStream(FileAccess.Write).Write(dataBuf, 0, dataBuf.Length);
            return(res);
        }
Beispiel #3
0
 public void SaveContent()
 {
     if (FileContent != null)
     {
         if (InitialContentLength != FileContent.GetStream(FileAccess.Read).Length)                 // TODO: wrong! not enough criteria
         {
             DalcFs.SaveContent(FileContent);
         }
     }
 }