Beispiel #1
0
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member 'RandomController.Get()'
        public Dictionary <string, string> Get()
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member 'RandomController.Get()'
        {
            try
            {
                image = random.GetEntry(null, image);
                return(new Dictionary <string, string>
                {
                    { "ID", image.Id.ToString() },
                    { "Points", image.Points.ToString() },
                    { "Author", image.Author },
                    { "Date uploaded", image.Date },
                    { "Link", image.Uri }
                });
            }
            catch (Exception)
            {
                Get();
                return(new Dictionary <string, string>
                {
                    { "ID", image.Id.ToString() },
                    { "Points", image.Points.ToString() },
                    { "Author", image.Author },
                    { "Date uploaded", image.Date },
                    { "Link", image.Uri }
                });
            }
        }
Beispiel #2
0
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member 'BestModel.OnGet()'
        public IActionResult OnGet()
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member 'BestModel.OnGet()'
        {
            Image = best.GetEntry(null, Image);
            return(Page());
        }