---
id: fast-foundation.container.registerwithcontext
title: Container.registerWithContext() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-foundation](./fast-foundation.md) &gt; [Container](./fast-foundation.container.md) &gt; [registerWithContext](./fast-foundation.container.registerwithcontext.md)

## Container.registerWithContext() method

Registers dependencies with the container via registration objects, providing the specified context to each register invocation.

<b>Signature:</b>

```typescript
registerWithContext(context: any, ...params: any[]): Container;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  context | any | The context object to pass to the registration objects. |
|  params | any\[\] | The registration objects. |

<b>Returns:</b>

[Container](./fast-foundation.container.md)
