---
title: "クラスHttpContextExtensions"
slug: "sitecore.aspnet.renderingengine.extensions.httpcontextextensions"
abstract: ""
---
# クラスHttpContextExtensions

httpコンテキスト拡張。

## 相続

System.Object

HttpContext拡張

### **名前空間**:Sitecore。AspNet.RenderingEngine.拡張

#### **アセンブリ**:Sitecore。AspNet.RenderingEngine.dll

##### 構文論

public static class HttpContextExtensions : Object

### 方法

#### AppendValue(IDictionary<String, String>, String, String)

コレクション操作の簡略化のための拡張手法。桁別項目に文字列値を挿入・付加します。ヘッダー操作に役立ちます。

##### 宣言

public static void AppendValue(this IDictionary<string, string> collection, string key, string value)

##### パラメータ

種類

名称

概要

System.Collections.Generic.IDictionary  
  
<  
  
System.String  
  
,  
  
System.String  
  
\[\]>

コレクション

目的地の回収。

System.String

キー

キーネーム。

System.String

価値

値配列に追加する。

#### CopyHeader(IEnumerable<KeyValuePair<String, StringValues>>, String, IDictionary<String, String>)

Httpヘッダーのコピーのための拡張メソッド。

##### 宣言

public static void CopyHeader(this IEnumerable<KeyValuePair<string, StringValues>> source, string headerKey, IDictionary<string, string> destination)

##### パラメータ

種類

名称

概要

System.Collections.Generic.IEnumerable  
  
<  
  
System.Collections.Generic.KeyValuePair  
  
<  
  
System.String  
  
,  
  
Microsoft.拡張。プリミティブ。StringValues  
  
\>>

出典

ソースコレクション。

System.String

ヘッダーキー

ヘッダー名をコピーしてください。

System.Collections.Generic.IDictionary  
  
<  
  
System.String  
  
,  
  
System.String  
  
\[\]>

目的地

目的地の回収。

#### CopyHeader(ILookup<String, String>, String, IDictionary<String, String>)

Httpヘッダーのコピーのための拡張メソッド。

##### 宣言

public static void CopyHeader(this ILookup<string, string> source, string headerKey, IDictionary<string, string> destination)

##### パラメータ

種類

名称

概要

System.Linq.ILookup  
  
<  
  
System.String  
  
,  
  
System.String  
  
\>

出典

ソースコレクション。

System.String

ヘッダーキー

ヘッダー名をコピーしてください。

System.Collections.Generic.IDictionary  
  
<  
  
System.String  
  
,  
  
System.String  
  
\[\]>

目的地

目的地の回収。

#### UpdateResponseWithLayoutMetadata(ISitecoreRenderingContext, HttpContext)

サイトコアレンダリングコンテキストからのメタデータで応答を更新します。

##### 宣言

public static void UpdateResponseWithLayoutMetadata(this ISitecoreRenderingContext renderingContext, HttpContext context)

##### パラメータ

種類

名称

概要

ISitecoreRenderingContext

レンダリングコンテキスト

Sitecoreのレンダリングコンテキスト。

Microsoft。AspNetCore.http.HttpContext

背景

httpコンテキスト。