Skip to content

Instantly share code, notes, and snippets.

@RobGibbens
RobGibbens / sitereliability.md
Created September 15, 2022 14:58
Site reliability

‎‎​

@RobGibbens
RobGibbens / BitmapImageValueConverter.cs
Created July 27, 2013 15:12
MvvmCross BitmapImageValueConverter
public class BitmapImageValueConverter : MvxValueConverter<byte[], BitmapImage>
{
protected override BitmapImage Convert(byte[] value, Type targetType, object parameter, CultureInfo culture)
{
var bitmapImage = new BitmapImage();
try
{
if (value != null)
{
var ms = new MemoryStream(value);
public ActionResult Index()
{
var repo = new Repository();
var dto = repo.GetDtoById(1); // Note, this doesn't know about the cache at all
}
public class Repository()
{
[Cache(Duration = 10)]
public DTO GetDtoById(int id)