# IInbox Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinbox/)

## Register(IInboxHandler) {#register-orleans-durable-messaging-iinboxhandler-c958d797}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinbox/methods/register-orleans-durable-messaging-iinboxhandler-c958d797/)

```csharp
public abstract IInbox Register(IInboxHandler handler)
```

Registers a handler.

### Parameters

- `handler` (`IInboxHandler`): The handler.

### Returns

This inbox.

## Register(IInboxMessageSink) {#register-orleans-durable-messaging-iinboxmessagesink-da65af52}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinbox/methods/register-orleans-durable-messaging-iinboxmessagesink-da65af52/)

```csharp
public abstract IInbox Register(IInboxMessageSink sink)
```

Registers a sink which accepts messages directly into application-owned journaled state.

### Parameters

- `sink` (`IInboxMessageSink`): The sink.

### Returns

This inbox.

## RegisterWakeup(Func&lt;TimeSpan?&gt;) {#registerwakeup-system-func-system-timespan-nullable-4ff1db13}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinbox/methods/registerwakeup-system-func-system-timespan-nullable-4ff1db13/)

```csharp
public abstract IInbox RegisterWakeup(Func<TimeSpan?> getWakeupDelay)
```

Registers a callback which reports durable work held outside the inbox, such as messages which an [IInboxMessageSink](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinboxmessagesink/) accepted, so the messaging wake-up reactivates the grain while that work remains.

### Parameters

- `getWakeupDelay` (`Func<TimeSpan?>`): Returns `null` when no work is pending; otherwise, the longest acceptable delay before a deactivated grain is reactivated to resume the work. A delay of `System.TimeSpan.Zero` or less requests a prompt wake-up.

### Returns

This inbox.
