示例#1
0
        public void Save(IStorageContext context, InformationUnitId informationUnit, IStorableData data)
        {
            string folder = string.Format(@"{0}\{1}\", _rootFolder, context.Name);

            Directory.CreateDirectory(folder);
            string path = string.Format(@"{0}\{1}", folder, informationUnit.Name);

            File.WriteAllBytes(path, data.GetBytes());
        }
示例#2
0
 public SampleStorableData(IStorableData storableData)
     : this()
 {
     SetBytes(storableData.GetBytes());
 }