-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Nancy 2.0.0-clinteastwood feedback #2659
Comments
This compiles, but throws a run-time pipelines.BeforeRequest.AddItemToStartOfPipeline((ctx, _) =>
{
// do stuff
// Func<NancyContext, Response>, Func<NancyContext, CancellationToken, Response>
return null;
}); This works: pipelines.BeforeRequest.AddItemToStartOfPipeline((ctx, _) =>
{
//do stuff
// Func<NancyContext, CancellationToken, Task<Response>>
return Task<Response>.FromResult((Response)null);
}); It took a bit of bashing my head against the wall until I figured it out which is neither super-duper nor happy. |
This code throw an exception, is this bug? public class BaseModule : NancyModule
{
public BaseModule(string url) : base(url)
{
//Custom logic
}
}
public class A : BaseModule
{
public A() : base("urlA")
{
}
}
public class B : NancyModule
{
public B()
{
}
}
|
It's because the base module doesn't have a constructor that the IoC container can satisfy. It doesn't know how to handle |
Old:
New(2.0):
|
Get("post/{id}", MyMethod); |
That usage adds some indirection. I personally don't like that. Not a problem though. |
Maybe it is possible to have some method overloads for fluent expression? example:
An alternate expression
I can take a stab at PR if this is desirable |
If you find any problems, please open an issue and provide as much information, as possible, to help us identify your problem. Alternatively, feel free to submit a pull-request if you think you can help resolve the problem. If you need a guiding hand, on how to get started with pull-requests, please have a look at our contributing guidelines. Make sure you don't miss the style guidelines, I won't :D
Please use this issue for posting comments that are not directly related to any specific reported bug or pull-request.
TODO
The following is a list of identified task that needs to be performed in the wake of the
2.0.0-clinteastwood
release and should be completed before2.0.0-dangermouse
is released. Edit the TODO-list and add items as they are found, add links to pull-requests that are sent to close themAsyncUsageAnalyzers
it set to a build dependency in allproject.json
andpackages.config
Correct example to mirror here - (pull request Made AsyncUsageAnalyzers a build dependency #2700 @jchannon*.nuspec
files in all projects (including Nancy) (pull-request Remove nuspecs as no longer needed #2658 @jchannon)Nancy.Hosting.Aspnet\project.json
to includeweb.config.transform
in the package (pull-request Included app/web.config.transform files in nuget packages #2661 @thecodejunkie)Nancy.ViewEngines.Razor\project.json
to includeapp/web.config.transform
in the package (pull-request Included app/web.config.transform files in nuget packages #2661 @thecodejunkie)Nancy.ViewEngines.Razor\project.json
to includeNancy.ViewEngines.Razor.BuildProvider
(including build targets) in the packagePlanned changes
Request.Cookies
andRequest.Headers.Cookie
see Cookie #2628 for discussionsKnown limitations
AsyncUsageAnalyzers
as a dependency. This should be safe to be removed and will not be included in2.0.0-dangermouse
as it will be marked as a build dependency in all projectsNancy.Hosting.Aspnet
package will not apply*.config
transformations`, to wire up the hosting, you will have to apply it yourselfNancy.ViewEngines.Razor
package will not apply*.config
transformations` to wire up the view engines configuration options, you will have to apply it yourselfNancy.ViewEngines.Razor
are missing from the NuGet package, causing problems with syntax highlighting in Nancy Razor viewsThe text was updated successfully, but these errors were encountered: