# Class IrcGatewayService | EchoHub Documentation

# Class IrcGatewayService

Namespace
  EchoHub.Server.Irc

Assembly
  EchoHub.Server.Irc.dll

    public sealed class IrcGatewayService : BackgroundService, IDisposable

Inheritance
  object
  BackgroundService
  IrcGatewayService

Implements
  IDisposable

Inherited Members
  object.GetType()
  object.ToString()
  object.Equals(object)
  object.Equals(object, object)
  object.ReferenceEquals(object, object)
  object.GetHashCode()

## Constructors

### IrcGatewayService(IOptions<IrcOptions>, IServiceProvider, ILogger<IrcGatewayService>)

    public IrcGatewayService(IOptions<IrcOptions> options, IServiceProvider services, ILogger<IrcGatewayService> logger)

#### Parameters

`options` IOptions<IrcOptions>
`services` IServiceProvider
`logger` ILogger<IrcGatewayService>

## Properties

### Connections

    public IReadOnlyDictionary<string, IrcClientConnection> Connections { get; }

#### Property Value

IReadOnlyDictionary<string, IrcClientConnection>

### Options

    public IrcOptions Options { get; }

#### Property Value

IrcOptions

## Methods

### ExecuteAsync(CancellationToken)

    protected override Task ExecuteAsync(CancellationToken stoppingToken)

#### Parameters

`stoppingToken` CancellationToken

#### Returns

Task

### GetAllConnections()

    public IEnumerable<IrcClientConnection> GetAllConnections()

#### Returns

IEnumerable<IrcClientConnection>

### GetConnectionsInChannel(string)

    public IEnumerable<IrcClientConnection> GetConnectionsInChannel(string channelName)

#### Parameters

`channelName` string

#### Returns

IEnumerable<IrcClientConnection>

### StopAsync(CancellationToken)

    public override Task StopAsync(CancellationToken cancellationToken)

#### Parameters

`cancellationToken` CancellationToken

#### Returns

Task