Example #1
0
 public Datafile(string category, string group, string filename, string extension)
 {
     this.ID        = -1;
     this.Category  = category;
     this.Group     = group;
     this.Filename  = filename;
     this.Extension = DatafilesBackingStore.CleanExtension(extension);
 }
Example #2
0
 public Datafile(string category, string group, string filepath)
 {
     this.ID        = -1;
     this.Category  = category;
     this.Group     = group;
     this.Filename  = Path.GetFileNameWithoutExtension(filepath);
     this.Extension = DatafilesBackingStore.CleanExtension(Path.GetExtension(filepath));
     LoadContentFromFile(filepath);
     this.Save();
 }
Example #3
0
 public Datafile(string category, string group, string filename, string extension, byte[] content)
 {
     this.ID        = -1;
     this.Category  = category;
     this.Group     = group;
     this.Filename  = filename;
     this.Extension = DatafilesBackingStore.CleanExtension(extension);
     this.Content   = content;
     this.Save();
 }