protected UnityObject(Legacy_UnityImage legacy) { this.UsersWhoVotedFor = legacy._VoteRevealOptions?._RelevantUsers?.Select(user => user.Id).ToList().AsReadOnly(); this.Title = new UnityField <string> { Value = legacy._Title }; this.Header = new UnityField <string> { Value = legacy._Header }; this.Footer = new UnityField <string> { Value = legacy._Footer }; this.ImageIdentifier = new UnityField <string> { Value = legacy._ImageIdentifier }; this.OwnerUserId = legacy._ImageOwnerId; this.VoteCount = new UnityField <int?> { Value = legacy._VoteCount }; this.BackgroundColor = new UnityField <IReadOnlyList <int> > { Value = legacy._BackgroundColor }; this.UnityObjectId = legacy._UnityImageId; this.Options = new Dictionary <UnityObjectOptions, object> { { UnityObjectOptions.RevealThisImage, legacy._VoteRevealOptions?._RevealThisImage } }; }
public UnityImage(Legacy_UnityImage legacy) : base(legacy) { this.Type = UnityObjectType.Image; this.Base64Pngs = legacy._Base64Pngs; this.SpriteGridWidth = legacy._SpriteGridWidth; this.SpriteGridHeight = legacy._SpriteGridHeight; }
public UnityText(Legacy_UnityImage legacy) : base(legacy) { this.Type = UnityObjectType.Text; }