Show / Hide Table of Contents

Struct ResourceEntry

Represents resource entry.

Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: DotNext.Resources
Assembly: DotNext.dll
Syntax
public readonly struct ResourceEntry

Properties

| Edit this page View Source

Manager

Gets resource manager providing access to the entry.

Declaration
public ResourceManager Manager { get; }
Property Value
Type Description
ResourceManager
| Edit this page View Source

Name

Gets name of the resource entry.

Declaration
public string Name { get; }
Property Value
Type Description
string

Methods

| Edit this page View Source

AsStream(CultureInfo?)

Returns resource entry as a stream.

Declaration
public Stream AsStream(CultureInfo? culture = null)
Parameters
Type Name Description
CultureInfo culture

An object that represents the culture for which the resource is localized.

Returns
Type Description
Stream

The stream representing resource entry.

Exceptions
Type Condition
InvalidOperationException

The value of the specified resource is not Stream.

MissingManifestResourceException

No usable set of resources has been found, and there are no resources for the default culture.

MissingSatelliteAssemblyException

The default culture's resources reside in a satellite assembly that could not be found.

| Edit this page View Source

AsString(CultureInfo?)

Returns resource string.

Declaration
public string AsString(CultureInfo? culture = null)
Parameters
Type Name Description
CultureInfo culture

An object that represents the culture for which the resource is localized.

Returns
Type Description
string

The resource string.

Exceptions
Type Condition
InvalidOperationException

The value of the specified resource is not a string.

MissingManifestResourceException

No usable set of resources has been found, and there are no resources for the default culture.

MissingSatelliteAssemblyException

The default culture's resources reside in a satellite assembly that could not be found.

| Edit this page View Source

As<T>(CultureInfo?)

Deserializes resource entry.

Declaration
public T As<T>(CultureInfo? culture = null)
Parameters
Type Name Description
CultureInfo culture

An object that represents the culture for which the resource is localized.

Returns
Type Description
T

The deserialized resource entry.

Type Parameters
Name Description
T

The type of the resource entry.

Exceptions
Type Condition
InvalidOperationException

The resource entry is not of type T.

MissingManifestResourceException

No usable set of resources has been found, and there are no resources for the default culture.

MissingSatelliteAssemblyException

The default culture's resources reside in a satellite assembly that could not be found.

| Edit this page View Source

Format(params object?[])

Returns formatted resource string.

Declaration
public string Format(params object?[] args)
Parameters
Type Name Description
object[] args

The formatting arguments.

Returns
Type Description
string

The formatter resource string.

Operators

| Edit this page View Source

explicit operator Stream(in ResourceEntry)

Obtains resource entry as a stream.

Declaration
public static explicit operator Stream(in ResourceEntry entry)
Parameters
Type Name Description
ResourceEntry entry

The resource entry.

Returns
Type Description
Stream

The stream representing resource entry.

Exceptions
Type Condition
InvalidOperationException

The value of the specified resource is not a string.

MissingManifestResourceException

No usable set of resources has been found, and there are no resources for the default culture.

MissingSatelliteAssemblyException

The default culture's resources reside in a satellite assembly that could not be found.

| Edit this page View Source

explicit operator string(in ResourceEntry)

Obtains resource string.

Declaration
public static explicit operator string(in ResourceEntry entry)
Parameters
Type Name Description
ResourceEntry entry

The resource entry.

Returns
Type Description
string
Exceptions
Type Condition
InvalidOperationException

The value of the specified resource is not a string.

MissingManifestResourceException

No usable set of resources has been found, and there are no resources for the default culture.

MissingSatelliteAssemblyException

The default culture's resources reside in a satellite assembly that could not be found.

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, ReadOnlySpan<T>)
Collection.ToAsyncEnumerator<TEnumerator, T>(TEnumerator, CancellationToken)
Collection.ToClassicEnumerator<TEnumerator, T>(TEnumerator)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
ExpressionBuilder.Const<T>(T)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾