Skip to content

Delete C++ snippets from System.NET APIs #11399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
delete C++ snippet refs from System.Net
  • Loading branch information
gewarren committed Jun 3, 2025
commit 418da199ab2581655924fbeb424a90edb38dfdb6
23 changes: 11 additions & 12 deletions xml/System.Net.Cache/HttpCacheAgeControl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,18 @@
<Docs>
<summary>Specifies the meaning of time values that control caching behavior for resources obtained using <see cref="T:System.Net.HttpWebRequest" /> objects.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
This enumeration is used by members of the <xref:System.Net.Cache.HttpRequestCachePolicy> class to configure the time values for cache policies.



## Examples
The following code example creates a policy based on MaxAgeAndMinFresh.

:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet9":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet9":::
<format type="text/markdown"><![CDATA[

## Remarks
This enumeration is used by members of the <xref:System.Net.Cache.HttpRequestCachePolicy> class to configure the time values for cache policies.



## Examples
The following code example creates a policy based on MaxAgeAndMinFresh.

:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet9":::

]]></format>
</remarks>
<related type="Article" href="/dotnet/framework/network-programming/cache-management-for-network-applications">Cache Management for Network Applications</related>
Expand Down
35 changes: 17 additions & 18 deletions xml/System.Net.Cache/HttpRequestCacheLevel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,24 @@
<Docs>
<summary>Specifies caching behavior for resources obtained using the Hypertext Transfer protocol (HTTP).</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
This enumeration is used to set the cache level specified by <xref:System.Net.Cache.HttpRequestCachePolicy> objects.

This `BypassCache` value is the default cache behavior specified in the machine configuration file that ships with the .NET Framework. No entries are taken from caches, added to caches, or removed from caches between the client and server.

The <xref:System.Net.HttpWebRequest.DefaultCachePolicy%2A?displayProperty=nameWithType> property is used to get or set the default cache policy for <xref:System.Net.HttpWebRequest> instances. The <xref:System.Net.WebRequest.DefaultCachePolicy%2A?displayProperty=nameWithType> property is used to get or set the default cache policy for a <xref:System.Net.WebRequest> instance. The <xref:System.Net.WebRequest.CachePolicy%2A> property is used to get or set the cache policy for a specific request.

A copy of a resource is only added to the cache if the response stream for the resource is retrieved and read to the end of the stream. So another request for the same resource could use a cached copy, depending on the default cache policy level for this request.



## Examples
The following code example sets the application domain's caching policy to Default.

:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NCLSimpleCache/CPP/NCLSimpleCache.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet2":::
<format type="text/markdown"><![CDATA[

## Remarks
This enumeration is used to set the cache level specified by <xref:System.Net.Cache.HttpRequestCachePolicy> objects.

This `BypassCache` value is the default cache behavior specified in the machine configuration file that ships with the .NET Framework. No entries are taken from caches, added to caches, or removed from caches between the client and server.

The <xref:System.Net.HttpWebRequest.DefaultCachePolicy%2A?displayProperty=nameWithType> property is used to get or set the default cache policy for <xref:System.Net.HttpWebRequest> instances. The <xref:System.Net.WebRequest.DefaultCachePolicy%2A?displayProperty=nameWithType> property is used to get or set the default cache policy for a <xref:System.Net.WebRequest> instance. The <xref:System.Net.WebRequest.CachePolicy%2A> property is used to get or set the cache policy for a specific request.

A copy of a resource is only added to the cache if the response stream for the resource is retrieved and read to the end of the stream. So another request for the same resource could use a cached copy, depending on the default cache policy level for this request.



## Examples
The following code example sets the application domain's caching policy to Default.

:::code language="csharp" source="~/snippets/csharp/System.Net/WebRequest/CachePolicy/example.cs" id="Snippet2":::

]]></format>
</remarks>
<altmember cref="P:System.Net.HttpWebRequest.DefaultCachePolicy" />
Expand Down
Loading