internal static Attachment FromApiEntity()

in src/YouTrackSharp/Issues/Attachment.cs [18:29]


        internal static Attachment FromApiEntity(IssueAttachment entity)
        {
            return new Attachment()
            {
                Id = entity.Id,
                Url = entity.Url == null ? null : new Uri(entity.Url.TrimStart('/'), UriKind.RelativeOrAbsolute),
                Name = entity.Name,
                Author = entity.Author?.Login,
                Group = entity.Visibility?.ToSinglePermittedGroup(),
                Created = (entity.Created ?? 0).TimestampToDateTime()
            };
        }