Skip to content

public interface IRequestContext #5437

Answered by VictorTomaili
WasimAhmad asked this question in Help
Discussion options

You must be logged in to vote

You can write your own interface what inherited from IRequestContext. Then inject this as IRequestContext with your class what implement this interface. Where do you need to use your extra properties, cast your IRequestContext to your custom one and use. Or create base ServiceEndpoint for all of your endpoints then cast this IRequestContext to your custom context and set it to a property for use. Also you can override this property with new keyword and your custom interface.

Partial classes are merged to one class when compiled. Interfaces are works as same. If we ship the nuget with partial interface, It will converted to standart interface and you can't use benefits of it.

All partial-…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@WasimAhmad
Comment options

@WasimAhmad
Comment options

Answer selected by WasimAhmad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants