Fix code snippets (#8241)

Fixes https://github.com/aspnet/Docs.zh-cn/issues/72.
pull/8239/merge
Scott Addie 2018-08-23 10:07:05 -05:00 committed by GitHub
commit 37e7062043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -121,11 +121,11 @@ The following code registers `MyMemoryCache` with the [dependency injection](xre
The following code uses `MyMemoryCache`:
[!code-csharp [](memory/sample/RPcache/Pages/About.cshtml.cs?name=snippet)]
[!code-csharp[](memory/sample/RPcache/Pages/About.cshtml.cs?name=snippet)]
The size of the cache entry can be set by [Size](/dotnet/api/microsoft.extensions.caching.memory.memorycacheentryoptions.size?view=aspnetcore-2.1#Microsoft_Extensions_Caching_Memory_MemoryCacheEntryOptions_Size) or the [SetSize](/dotnet/api/microsoft.extensions.caching.memory.memorycacheentryextensions.setsize?view=aspnetcore-2.0#Microsoft_Extensions_Caching_Memory_MemoryCacheEntryExtensions_SetSize_Microsoft_Extensions_Caching_Memory_MemoryCacheEntryOptions_System_Int64_) extension method:
[!code-csharp [](memory/sample/RPcache/Pages/About.cshtml.cs?name=snippet2&highlight=9,10,14,15)]
[!code-csharp[](memory/sample/RPcache/Pages/About.cshtml.cs?name=snippet2&highlight=9,10,14,15)]
::: moniker-end