Table of Contents

RateBookExtensions Class

Definition

Namespace
Bodu.Financial.Extensions
Assembly
Bodu.Financial.dll
Package
Bodu.Financial 1.0.0
Source
RateBookExtensions.ToFixedProvider.cs

Provides extension methods that wrap an immutable RateBook in ready-to-query provider facades.

public static class RateBookExtensions
Inheritance
RateBookExtensions
Inherited Members

Methods

ToFixedProvider(RateBook)

Wraps the book in an immutable FixedDatedRateProvider, deriving the provider selection from the book's single provider per pair.

public static FixedDatedRateProvider ToFixedProvider(this RateBook book)

Parameters

book RateBook

The immutable book to wrap.

Returns

FixedDatedRateProvider

A provider resolving rates from book.

Exceptions

ArgumentNullException

Thrown when book is null.

ArgumentException

Thrown when book contains two providers for the same pair; use ToFixedProvider(RateBook, IEnumerable<string>) to disambiguate.

ToFixedProvider(RateBook, IEnumerable<string>)

Wraps the book in an immutable FixedDatedRateProvider applying an explicit provider-priority list per pair.

public static FixedDatedRateProvider ToFixedProvider(this RateBook book, IEnumerable<string> providerPriority)

Parameters

book RateBook

The immutable book to wrap.

providerPriority IEnumerable<string>

The ordered set of providers consulted for every pair. The first provider in this list that has a matching series for the pair wins; providers absent from the list are unreachable through the returned provider.

Returns

FixedDatedRateProvider

A provider resolving rates from book under the supplied priority.

Exceptions

ArgumentNullException

Thrown when book or providerPriority is null.

ArgumentException

Thrown when providerPriority is empty or contains a null/whitespace entry.

Applies to

ProductVersions
.NET8, 10