Skip to content

Instantly share code, notes, and snippets.

@MineshS
Created September 13, 2023 16:34
Show Gist options
  • Save MineshS/c6a3aa815348cb43ed4cbc2ce78baeda to your computer and use it in GitHub Desktop.
Save MineshS/c6a3aa815348cb43ed4cbc2ce78baeda to your computer and use it in GitHub Desktop.
Image Property Attributes
namespace Netcel.Optimizely.Domain.Attributes;
[AttributeUsage(AttributeTargets.Property)]
public class ImageSizesAttribute : Attribute
{
public string Sizes { get; set; }
}
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
public class ImageSizeAttribute : Attribute
{
public bool IsDefault { get; set; } = false;
public int Width { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment