public dtoDisplayObjectRepositoryItem(liteModuleLink link, liteRepositoryItem item, liteRepositoryItemVersion version)
 {
     LinkedBy    = "";
     IdLinkedBy  = 0;
     Permissions = new ItemPermission();
     Link        = link;
     Item        = item;
     Version     = version;
     if (version != null)
     {
         Description     = version.Description;
         Name            = version.Name;
         DisplayName     = version.DisplayName;
         IdCreatedBy     = version.IdCreatedBy;
         CreatedOn       = version.CreatedOn;
         IdVersion       = version.Id;
         Type            = version.Type;
         IdItem          = item.Id;
         DisplayMode     = version.DisplayMode;
         Url             = version.Url;
         Extension       = version.Extension;
         AutoThumbnail   = version.AutoThumbnail;
         IdVersion       = version.Id;
         UniqueId        = item.UniqueId;
         UniqueIdVersion = version.UniqueIdVersion;
         IsDownlodable   = item.IsDownloadable;
     }
     else if (item != null)
     {
         Description     = item.Description;
         Name            = item.Name;
         DisplayName     = item.DisplayName;
         IdCreatedBy     = item.IdCreatedBy;
         CreatedOn       = item.CreatedOn;
         IdVersion       = 0;
         UniqueIdVersion = Guid.Empty;
         Type            = item.Type;
         IdItem          = item.Id;
         DisplayMode     = item.DisplayMode;
         Url             = item.Url;
         Extension       = item.Extension;
         AutoThumbnail   = item.AutoThumbnail;
         IsDownlodable   = item.IsDownloadable;
     }
     Availability = (Version != null ? Version.Availability : (Item != null ? Item.Availability : ItemAvailability.notavailable));
     Size         = FolderSizeItem.FormatBytes((Version != null ? Version.Size : (Item != null ? Item.Size :0)));
 }
Пример #2
0
 public RepositoryItemObject(liteRepositoryItem item, liteRepositoryItemVersion version)
 {
     if (item != null)
     {
         IdItem          = item.Id;
         UniqueId        = item.UniqueId;
         IsFile          = item.IsFile;
         Type            = item.Type;
         Name            = item.Name;
         Extension       = item.Extension;
         Url             = item.Url;
         ContentType     = item.ContentType;
         Deleted         = item.Deleted;
         IsDownloadable  = item.IsDownloadable;
         IsInternal      = item.IsInternal;
         IdOwner         = item.IdOwner;
         IsVisible       = item.IsVisible;
         IsValid         = true;
         IdVersion       = item.IdVersion;
         UniqueIdVersion = item.UniqueIdVersion;
         Size            = item.Size;
     }
     else
     {
         Deleted = BaseStatusDeleted.Manual;
         IsValid = false;
     }
     if (version != null)
     {
         IdVersion       = version.Id;
         UniqueIdVersion = version.UniqueIdVersion;
         Size            = version.Size;
         Name            = version.Name;
         Extension       = version.Extension;
         Url             = version.Url;
         ContentType     = version.ContentType;
         Deleted         = version.Deleted;
     }
 }
Пример #3
0
 public dtoModuleUploadedItem(liteRepositoryItem item, liteRepositoryItemVersion version, ItemUploadError error)
 {
     Error        = error;
     ItemAdded    = item;
     VersionAdded = version;
 }