Exemplo n.º 1
0
        public async Task <IActionResult> MaskPage(string id)
        {
            Guid pageMaskId;

            try
            {
                pageMaskId = GuidEncoder.Decode(id);
            }
            catch (Exception e)
            {
                if (e is ArgumentException || e is FormatException)
                {
                    return(NotFound());
                }
                throw;
            }

            var pageMask = await _repository.GetPageMaskByIdAsync(pageMaskId);

            if (pageMask == null)
            {
                return(NotFound());
            }

            var model = new MaskPageViewModel()
            {
                PageMask = pageMask,
                Url      = $"{_settings.Value.Hostname}{id}"
            };

            return(View(model));
        }
Exemplo n.º 2
0
 public MaskPage()
 {
     InitializeComponent();
     BindingContext = new MaskPageViewModel();
 }