コード例 #1
0
ファイル: FileResourcePhoto.cs プロジェクト: sitkatech/alevin
 public FileResourcePhoto(ProjectImageUpdate projectImageUpdate)
 {
     EntityImageIDAsNullable = projectImageUpdate.ProjectImageID;
     PrimaryKey              = projectImageUpdate.ProjectImageUpdateID;
     FileResourceInfo        = projectImageUpdate.FileResourceInfo;
     DeleteUrl               = projectImageUpdate.GetDeleteUrl();
     IsKeyPhoto              = projectImageUpdate.IsKeyPhoto;
     Caption                 = projectImageUpdate.Caption;
     CaptionOnFullView       = projectImageUpdate.GetCaptionOnFullView();
     CaptionOnGallery        = projectImageUpdate.GetCaptionOnGallery();
     PhotoUrl                = projectImageUpdate.GetPhotoUrl();
     PhotoUrlScaledThumbnail = projectImageUpdate.GetPhotoUrlScaledThumbnail();
     EditUrl                 = projectImageUpdate.GetEditUrl();
     AdditionalCssClasses    = new List <string>();
 }
コード例 #2
0
        public static string GetCaptionOnFullView(this ProjectImageUpdate projectImageUpdate)
        {
            var creditString = string.IsNullOrWhiteSpace(projectImageUpdate.Credit) ? string.Empty : $"\r\nCredit: {projectImageUpdate.Credit}";

            return($"{projectImageUpdate.GetCaptionOnGallery()}{creditString}");
        }