Skip to content

Commit

Permalink
Update literalincludes for RC1 common samples
Browse files Browse the repository at this point in the history
  • Loading branch information
danroth27 committed Nov 18, 2015
1 parent 3740057 commit 83f074d
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion aspnet/client-side/bootstrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ If you're referencing your own local versions of Bootstrap, you'll need to refer
.. literalinclude:: /../common/samples/WebApplication1/src/WebApplication1/Views/Shared/_Layout.cshtml
:language: html
:linenos:
:emphasize-lines: 9,14,54,64
:emphasize-lines: 9,14,51,59

.. note:: If you're going to be using any of Bootstrap's jQuery plugins, you will also need to reference jQuery.

Expand Down
2 changes: 1 addition & 1 deletion aspnet/conceptual-overview/aspnet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ASP.NET 5 uses a new configuration model for handling of simple name-value pairs
.. literalinclude:: /../common/samples/WebApplication1/src/WebApplication1/Startup.cs
:language: c#
:linenos:
:lines: 29-42
:lines: 22-33
:dedent: 12

See :doc:`/fundamentals/configuration` for more details on the new configuration system and :doc:`/fundamentals/environments` for details on how to work with environments in ASP.NET 5.
Expand Down
2 changes: 1 addition & 1 deletion aspnet/conceptual-overview/understanding-aspnet5-apps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The global.json File
The global.json file is used to configure the solution as a whole. It includes just two sections, ``projects`` and ``sdk`` by default.

.. literalinclude:: /../common/samples/WebApplication1/global.json
:language: javascript
:language: json

The *projects* property designates which folders contain source code for the solution. By default the project structure places source files in a *src* folder, allowing build artifacts to be placed in a sibling folder, making it easier to exclude such things from source control.

Expand Down
2 changes: 1 addition & 1 deletion aspnet/dnx/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ A command is a named execution of a .NET entry point with specific arguments. Yo
.. literalinclude:: /../common/samples/WebApplication1/src/WebApplication1/project.json
:linenos:
:language: json
:lines: 32-35
:lines: 30-33
:dedent: 2

You can then use DNX to execute the commands defined by your project, like this::
Expand Down
4 changes: 2 additions & 2 deletions aspnet/fundamentals/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ It can be useful to have environment-specific configuration files. This can be a
:linenos:
:dedent: 8
:language: c#
:lines: 25-41
:emphasize-lines: 1,8
:lines: 19-34
:emphasize-lines: 1,6

The ``IHostingEnvironment`` service is used to get the current environment. In the ``Development`` environment, the highlighted line of code above would look for a file named ``appsettings.Development.json`` and use its values, overriding any other values, if it's present. Learn more about :doc:`environments`.

Expand Down
6 changes: 3 additions & 3 deletions aspnet/fundamentals/dependency-injection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ The ``ConfigureServices`` method in the ``Startup`` class is responsible for def
.. literalinclude:: ../../common/samples/WebApplication1/src/WebApplication1/Startup.cs
:language: c#
:linenos:
:lines: 47-70
:lines: 39-56
:dedent: 8
:emphasize-lines: 4,10,15
:emphasize-lines: 4,9,13

The features and middleware provided by ASP.NET, such as MVC, follow a convention of using a single ``AddService()`` extension method to register all of the services required by that feature.

Expand All @@ -51,7 +51,7 @@ In the default web template example above, two application services are added to
.. literalinclude:: ../../common/samples/WebApplication1/src/WebApplication1/Startup.cs
:language: c#
:linenos:
:lines: 67-69
:lines: 53-55
:dedent: 12
:emphasize-lines: 2-3

Expand Down
4 changes: 2 additions & 2 deletions aspnet/fundamentals/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ For example, you can use the following code in you Configure method to setup env
:language: c#
:linenos:
:dedent: 12
:lines: 82-93
:lines: 64-72,85

If the app is running in a ``Development`` environment, then it enables BrowserLink and error pages (which typically should not be run in production). Otherwise, if the app is not running in a development environment, a standard error handling page is configured to be displayed in response to any unhandled exceptions.
If the app is running in a ``Development`` environment, then it enables BrowserLink and development specific error pages (which typically should not be run in production). Otherwise, if the app is not running in a development environment, a standard error handling page is configured to be displayed in response to any unhandled exceptions.

Startup conventions
-------------------
Expand Down
4 changes: 2 additions & 2 deletions aspnet/fundamentals/middleware.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ You can see an example of setting up a request pipeline, using a variety of requ
.. literalinclude:: /../common/samples/WebApplication1/src/WebApplication1/Startup.cs
:language: c#
:linenos:
:lines: 73-103,128-138
:lines: 59-72,85-101
:dedent: 8
:emphasize-lines: 12-14,20,27,30,33
:emphasize-lines: 8-10,14,19,21,25

Because of the order in which this pipeline was constructed, the middleware configured by the ``UseExceptionHandler`` method will catch any exceptions that occur in later calls (in non-development environments). Also, in this example a design decision has been made that static files will not be protected by any authentication. This is a tradeoff that improves performance when handling static files since no other middleware (such as authentication middleware) needs to be called when handling these requests (ASP.NET 5 uses a specific ``wwwroot`` folder for all files that should be accessible by default, so there is typically no need to perform authentication before sending these files). If the request is not for a static file, it will flow to the next piece of middleware defined in the pipeline (in this case, Identity). Learn more about :doc:`static-files`.

Expand Down
8 changes: 4 additions & 4 deletions aspnet/fundamentals/startup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ Your ``Configure`` method must accept an ``IApplicationBuilder`` parameter. Addi
.. literalinclude:: /../common/samples/WebApplication1/src/WebApplication1/Startup.cs
:language: c#
:linenos:
:lines: 73-103,128-138
:lines: 59-72,85-101
:dedent: 8
:emphasize-lines: 12-14,20,27,30,33
:emphasize-lines: 8-10,14,19,21,25

You can see what each of these extensions does by examining the source. For instance, the ``UseMvc`` extension method is defined in ``BuilderExtensions`` available on `GitHub <https://github.com/aspnet/Mvc/blob/6.0.0-beta5/src/Microsoft.AspNet.Mvc/BuilderExtensions.cs>`_. Its primary responsibility is to ensure that MVC was added as a service (in ``ConfigureServices``) and to correctly set up routing for an ASP.NET MVC application.

Expand All @@ -44,9 +44,9 @@ Just as with ``Configure``, it is recommended that features that require substan
.. literalinclude:: /../common/samples/WebApplication1/src/WebApplication1/Startup.cs
:language: c#
:linenos:
:lines: 47-70
:lines: 39-56
:dedent: 8
:emphasize-lines: 4,10,15
:emphasize-lines: 4,9,13

Adding services to the services container makes them available within your application via :doc:`dependency injection <dependency-injection>`. Just as the ``Startup`` class is able to specify dependencies its methods require as parameters, rather than hard-coding to a specific implementation, so too can your middleware, MVC controllers and other classes in your application.

Expand Down
4 changes: 2 additions & 2 deletions aspnet/security/app-secrets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ Then add the user secrets configuration source:
.. literalinclude:: /../common/samples/WebApplication1/src/WebApplication1/Startup.cs
:linenos:
:language: c#
:lines: 29-40
:emphasize-lines: 10
:lines: 22-33
:emphasize-lines: 8
:dedent: 12

You can now access user secrets via the configuration API:
Expand Down
4 changes: 2 additions & 2 deletions aspnet/security/sociallogins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ Follow these steps to add the Facebook AppId and AppSecret to the Secret Manager
.. literalinclude:: /../common/samples/WebApplication1/src/WebApplication1/Startup.cs
:linenos:
:language: c#
:lines: 29-40
:emphasize-lines: 10
:lines: 22-33
:emphasize-lines: 8
:dedent: 12

Enable Facebook middleware
Expand Down

0 comments on commit 83f074d

Please sign in to comment.