Пример #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
     };
 }
Пример #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
         };
 }