Table of Contents

Class CountryDataLoadResult

Namespace
Core.Data
Assembly
Core.dll

Wrapper around CountryDataCollection to provide consistent result API Matches the expected interface for integration with CountrySystem

public class CountryDataLoadResult
Inheritance
object
CountryDataLoadResult

Properties

Countries

The loaded country data collection

public CountryDataCollection Countries { get; }

Property Value

CountryDataCollection

ErrorMessage

Error message if loading failed

public string ErrorMessage { get; }

Property Value

string

IsSuccess

Whether the loading operation was successful

public bool IsSuccess { get; }

Property Value

bool

Statistics

Additional loading statistics and metadata

public LoadingStatistics Statistics { get; }

Property Value

LoadingStatistics

Methods

Dispose()

Clean up resources

public void Dispose()

Failure(string)

Create a failed result

public static CountryDataLoadResult Failure(string errorMessage)

Parameters

errorMessage string

Returns

CountryDataLoadResult

GetSummary()

Get summary information about the loaded data

public string GetSummary()

Returns

string

Success(CountryDataCollection, LoadingStatistics)

Create a successful result

public static CountryDataLoadResult Success(CountryDataCollection countries, LoadingStatistics stats = null)

Parameters

countries CountryDataCollection
stats LoadingStatistics

Returns

CountryDataLoadResult

Validate()

Validate that the result contains valid data

public List<string> Validate()

Returns

List<string>