コード例 #1
0
 public TData ReadAsDataFile <TData>(string virtualUri = null, int dataSizeInBytes = -1)
     where TData : DataFile, new()
 {
     byte[] data = ReadBytes((dataSizeInBytes < 0) ? (int)Length : dataSizeInBytes);
     return(DataFile.LoadFromBytes <TData>(data, virtualUri ?? FileName));
 }
コード例 #2
0
 public void WriteDataFile <TData>(TData data, string virtualUri)
     where TData : DataFile, new()
 {
     byte[] bytes = DataFile.SaveAsBytes(data, virtualUri);
     Write(bytes);
 }