---
title: "クラスサービスコレクション拡張"
slug: "sitecore.aspnet.renderingengine.extensions.servicecollectionextensions"
abstract: ""
---
# クラスサービスコレクション拡張

MicrosoftにおけるSitecoreレンダリングエンジン関連サービスを設定する拡張手法。拡張s.DependencyInjection.IServiceCollection。

## 相続

System.Object

ServiceCollectionExtensions

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

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

##### 構文論

public static class ServiceCollectionExtensions : Object

### 方法

#### AddSitecoreRenderingEngine(IServiceCollection, Action)

Sitecoreレンダリングエンジンサービスを追加してMicrosoftに。拡張。DependencyInjection.IServiceCollection。

##### 宣言

public static ISitecoreRenderingEngineBuilder AddSitecoreRenderingEngine(this IServiceCollection services, Action<RenderingEngineOptions> options = null)

##### パラメータ

種類

名称

概要

Microsoft。拡張。DependencyInjection.IServiceCollection

サービス

Microsoft。Extensions.DependencyInjection.IServiceCollectionにサービスを追加できます。

システム。アクション  
  
<  
  
RenderingEngineOptions  
  
\>

オプション

レンダリングエンジンのオプションを設定します。

##### 返還

種類

概要

ISitecoreRenderingEngineBuilder

Microsoft.拡張。DependencyInjection.IServiceCollectionで、追加の呼び出しを連鎖させることができます。

#### ForwardHeaders(ISitecoreRenderingEngineBuilder, Action)

ヘッダーの転送を可能にします。

##### 宣言

public static ISitecoreRenderingEngineBuilder ForwardHeaders(this ISitecoreRenderingEngineBuilder serviceBuilder, Action<ForwardHeadersOptions> options = null)

##### パラメータ

種類

名称

概要

ISitecoreRenderingEngineBuilder

サービスビルダー

サービスを追加するための [ISitecoreRenderingEngineBuilder](https://doc.sitecore.com/xp/ja/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.aspnet.renderingengine.isitecorerenderingenginebuilder.html) 。

システム。アクション  
  
<  
  
ForwardHeadersOptions  
  
\>

オプション

ヘッダーの転送オプションの設定。

##### 返還

種類

概要

ISitecoreRenderingEngineBuilder

Microsoft.拡張。DependencyInjection.IServiceCollectionで、追加の呼び出しを連鎖させることができます。