File: CustomService.cs
Web Access
Project: src\src\Mvc\test\WebSites\BasicWebSite\BasicWebSite.csproj (BasicWebSite)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
 
using BasicWebSite.Models;
using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.AspNetCore.Mvc;
 
namespace BasicWebSite;
 
public interface ICustomService
{
    string Process();
}
 
public class OkCustomService : ICustomService
{
    public string Process() => "OK";
    public override string ToString() => Process();
}
 
public class BadCustomService : ICustomService
{
    public string Process() => "NOT OK";
    public override string ToString() => Process();
}
 
public class DefaultCustomService : ICustomService
{
    public string Process() => "DEFAULT";
    public override string ToString() => Process();
    public static DefaultCustomService Instance => new DefaultCustomService();
}