简体   繁体   English

什么是 ASP.NET 提供程序?

[英]What is an ASP.NET Provider?

What is the meaning of "Provider" in ASP.NET Provider? ASP.NET Provider中的“Provider”是什么意思? For example when we are speaking about AuthorizationRuleProvider , connectionStrings.providerName , ...?例如,当我们谈论AuthorizationRuleProviderconnectionStrings.providerName ,...?

It's a design pattern: The Provider model .这是一种设计模式:提供者模型 There is some good information in this SO Q&A as well: Designing loosely coupled components in .NET - Provider Pattern在这个 SO Q&A 中也有一些很好的信息: Designingloosely Coupled components in .NET - Provider Pattern

It's just a concrete implementation of an abstract interface.它只是抽象接口的具体实现。 You can select an appropriate provider to fulfill the requirements of the interface at runtime.您可以选择合适的提供程序来满足运行时接口的要求。

如果你想在你的应用程序中实现提供者模式,看看这个.NET Provider Model Template for Visual Studio (无耻插件)。

As other answered above, it is the provider pattern.正如上面其他人回答的那样,它是提供者模式。 I would like to add that the Provider patter n is an alias for the Strategy pattern .我想补充一点, Provider 模式n 是Strategy 模式的别名。

https://en.wikipedia.org/wiki/Provider_model https://en.wikipedia.org/wiki/Provider_model

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM