Exemple #1
0
 protected void ReadEntity(CacheReader f, UxlEntityFlags flags)
 {
     if (flags.HasFlag(UxlEntityFlags.Elements))
     {
         f.ReadList(Elements, UxlElement.Read);
     }
     if (flags.HasFlag(UxlEntityFlags.CopyFiles))
     {
         f.ReadList(CopyFiles, r => f.ReadCopyFile());
     }
     if (flags.HasFlag(UxlEntityFlags.ImageFiles))
     {
         f.ReadList(ImageFiles, r => f.ReadImageFile());
     }
 }
Exemple #2
0
 protected void WriteEntity(CacheWriter f, UxlEntityFlags flags)
 {
     if (flags.HasFlag(UxlEntityFlags.Elements))
     {
         f.WriteList(Elements, (w, x) => x.Write(w));
     }
     if (flags.HasFlag(UxlEntityFlags.CopyFiles))
     {
         f.WriteList(CopyFiles, (w, x) => w.Write(x));
     }
     if (flags.HasFlag(UxlEntityFlags.ImageFiles))
     {
         f.WriteList(ImageFiles, (w, x) => w.Write(x));
     }
 }