Esempio n. 1
0
 public static Doc CreateFolder(string name, string description, string path, Doc container, UserAccount owner)
 {
     return new Doc
     {
         Id = Guid.NewGuid(),
         Name = name,
         Description = description,
         Path = path,
         Parent = container,
         IsFolder = true,
         Owner = owner
     };
 }
Esempio n. 2
0
 public static Doc CreateFile(string name, string description, bool isFolder, string path, Doc container, UserAccount owner)
 {
     if (isFolder)
         return CreateFolder(name, description, path, container, owner);
     else
         return new Doc
         {
             Id = Guid.NewGuid(),
             Name = name,
             Description = description,
             IsFolder = false,
             Path = path,
             Parent = container,
             Owner = owner
         };
 }