Merge pull request #20 from aspnet/retire-repo
Prepare the Repo for archival.
This commit is contained in:
Коммит
85675f4851
|
@ -1,50 +0,0 @@
|
|||
# How to contribute
|
||||
|
||||
One of the easiest ways to contribute is to participate in discussions and discuss issues. You can also contribute by submitting pull requests with code changes.
|
||||
|
||||
|
||||
## General feedback and discussions?
|
||||
Please start a discussion on the [Issue tracker](https://github.com/aspnet/AspNetWebFormsDependencyInjection/issues).
|
||||
|
||||
|
||||
## Bugs and feature requests?
|
||||
For non-security related bugs please log a new issue according to the [Functional bug template](https://github.com/aspnet/AspNetWebFormsDependencyInjection/wiki/Functional-bug-template).
|
||||
|
||||
|
||||
|
||||
## Reporting security issues and bugs
|
||||
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://technet.microsoft.com/en-us/security/ff852094.aspx).
|
||||
|
||||
|
||||
## Contributing code and content
|
||||
|
||||
**Obtaining the source code**
|
||||
|
||||
If you are an outside contributer, please fork the repository. See the GitHub documentation for [forking a repo](https://help.github.com/articles/fork-a-repo/) if you have any questions about this.
|
||||
|
||||
**Submitting a pull request**
|
||||
|
||||
You will need to sign a [Contributor License Agreement](https://cla.opensource.microsoft.com//) when submitting your pull request. To complete the Contributor License Agreement (CLA), you will need to follow the instructions provided by the CLA bot when you send the pull request. This needs to only be done once for any Microsoft OSS project.
|
||||
|
||||
If you don't know what a pull request is read this article: https://help.github.com/articles/using-pull-requests. Make sure the respository can build and all tests pass.
|
||||
|
||||
**Commit/Pull Request Format**
|
||||
|
||||
```
|
||||
Summary of the changes (Less than 80 chars)
|
||||
- Detail 1
|
||||
- Detail 2
|
||||
|
||||
Addresses #bugnumber (in this specific format)
|
||||
```
|
||||
|
||||
**Tests**
|
||||
|
||||
- Tests need to be provided for every bug/feature that is completed.
|
||||
- Tests only need to be present for issues that need to be verified by QA (e.g. not tasks)
|
||||
- If there is a scenario that is far too hard to test there does not need to be a test for it.
|
||||
- "Too hard" is determined by the team as a whole.
|
||||
|
||||
**Feedback**
|
||||
|
||||
Your pull request will now go through extensive checks by the subject matter experts on our team. Please be patient; we have hundreds of pull requests across all of our repositories. Update your pull request according to feedback until it is approved by one of the ASP.NET team members. After that, one of our team members will add the pull request to **dev**.
|
22
README.md
22
README.md
|
@ -1,4 +1,5 @@
|
|||
_This project demonstrates building a dependency injection adapter for the [Unity](https://github.com/unitycontainer/unity) IoC container **as a point of reference** for other adapter authors. Please note that this implementation is for demonstration purposes only and **is not being actively maintained.**_
|
||||
> **Warning**
|
||||
> _This project demonstrates building a dependency injection adapter for the [Unity](https://github.com/unitycontainer/unity) IoC container. **It is a point of reference** for other adapter authors. Please note that this implementation is for demonstration purposes only and **is not being actively maintained.**_
|
||||
|
||||
## Introduction
|
||||
[Dependency injection](https://en.wikipedia.org/wiki/Dependency_injection) design pattern is widely used in modern applications. It decouples objects to the extent that no client code has to be changed simply because an object it depends on needs to be changed to a different one. It brings you a lot of [benefits](http://tutorials.jenkov.com/dependency-injection/dependency-injection-benefits.html), like reduced dependency, more reusable code, more testable code, etc. However, it was very difficult to use dependency injection in WebForms application before. This is not an issue in .Net Framework 4.7.2 anymore. Dependency injection is natively supported in WebForms applications.
|
||||
|
@ -11,21 +12,18 @@ _This project demonstrates building a dependency injection adapter for the [Unit
|
|||
<httpRuntime targetFramework="4.7.2"/>
|
||||
</system.web>
|
||||
```
|
||||
2. Install Microsoft.AspNet.WebFormsDependencyInjection.Unity nupkg in your project.
|
||||
3. Open Global.asax and register the types in UnityContainer.
|
||||
2. Add the [`Unity.Container`](https://www.nuget.org/packages/Unity.Container/5.8.6) nuget package to your web project.
|
||||
3. Add a reference to Microsoft.AspNet.WebFormsDependencyInjection.Unity.dll built by this project in your web project.
|
||||
4. Open Global.asax and register the types in UnityContainer.
|
||||
```
|
||||
protected void Application_Start(object sender, EventArgs e)
|
||||
{
|
||||
var container = this.AddUnity();
|
||||
|
||||
container.RegisterType<ISomeInterface, SomeImplementation>();
|
||||
}
|
||||
protected void Application_Start(object sender, EventArgs e)
|
||||
{
|
||||
var container = this.AddUnity();
|
||||
container.RegisterType<ISomeInterface, SomeImplementation>();
|
||||
}
|
||||
```
|
||||
|
||||
## How to build
|
||||
1. Open a [VS developer command prompt](https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs)
|
||||
2. Run build.cmd. This will build Nuget package and run all the unit tests.
|
||||
3. All the build artifacts will be under AspNetWebFormsDependencyInjection\bin\Release\ folder.
|
||||
|
||||
## How to contribute
|
||||
Information on contributing to this repo is in the [Contributing Guide](CONTRIBUTING.md).
|
||||
|
|
Загрузка…
Ссылка в новой задаче