Closed xjfnet closed 4 years ago
@xjfnet I think you need to provide more info.
namespace CefSharpDemo
{
class Program
{
[STAThread]
static void Main(string[] args)
{
AppBuilder
.Create()
.UseApp<DemoApp>()
.Build()
.Run(args);
}
}
public class DemoApp : ChromelyBasicApp
{
public override void ConfigureServices(ServiceCollection services)
{
base.ConfigureServices(services);
RegisterControllerAssembly(services, typeof(DemoApp).Assembly);
}
}
[ControllerProperty(Name = "DemoController")]
public class DemoController : ChromelyController
{
[RequestAction(RouteKey = "/democontroller/hello")]
public IChromelyResponse Hello(IChromelyRequest request)
{
return new ChromelyResponse(request.Id)
{
Data = "Hello Chromely"
};
}
}
}
change ChromelyBasicApp to ChromelyFramelessApp and try again!
Changing to ChromelyFramelessApp works.
maybe it's my mistake it works now, and i don't know what happend i use JetBrains Rider to build my program, anyway it works thanks.
chromely.cefsharp.5.1.83-pre02 RequestAction do not work and RegisterRequest works well