November Happy Hour will be moved to Thursday December 5th.

Struct ResourceItem

Represent information about a string resource item in the system.

Implements
System.IEquatable<ResourceItem>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: EPiServer.Framework.Localization
Assembly: EPiServer.Framework.dll
Version: 10.10.4
Syntax
public struct ResourceItem : IEquatable<ResourceItem>

Constructors

ResourceItem(String, String, CultureInfo)

Initializes a new instance of the ResourceItem struct.

Declaration
public ResourceItem(string key, string value, CultureInfo sourceCulture)
Parameters
Type Name Description
System.String key

The resource key.

System.String value

The resource value.

System.Globalization.CultureInfo sourceCulture

The culture that the resource is specified in.

Properties

Key

Gets the resource key.

Declaration
public string Key { get; }
Property Value
Type Description
System.String

The resource key.

SourceCulture

Gets the culture that the resource was specified in.

Declaration
public CultureInfo SourceCulture { get; }
Property Value
Type Description
System.Globalization.CultureInfo

The source culture.

Value

Gets the resource value.

Declaration
public string Value { get; }
Property Value
Type Description
System.String

The resource value.

Methods

Equals(ResourceItem)

Determines whether the specified ResourceItem is equal to this instance.

Declaration
public bool Equals(ResourceItem other)
Parameters
Type Name Description
ResourceItem other

The ResourceItem to compare with this instance.

Returns
Type Description
System.Boolean

true if the specified ResourceItem is equal to this instance; otherwise, false.

Equals(Object)

Determines whether the specified System.Object is equal to this instance.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The System.Object to compare with this instance.

Returns
Type Description
System.Boolean

true if the specified System.Object is equal to this instance; otherwise, false.

Overrides
System.ValueType.Equals(System.Object)

GetHashCode()

Returns a hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides
System.ValueType.GetHashCode()

ToString()

Returns a System.String that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String that represents this instance.

Overrides
System.ValueType.ToString()

Operators

Equality(ResourceItem, ResourceItem)

Implements the operator ==.

Declaration
public static bool operator ==(ResourceItem item1, ResourceItem item2)
Parameters
Type Name Description
ResourceItem item1

The item on the left hand side of the operator.

ResourceItem item2

The item on the right hand side of the operator.

Returns
Type Description
System.Boolean

true if the first ResourceItem is equal to the second ResourceItem; otherwise, false.

Inequality(ResourceItem, ResourceItem)

Implements the operator !=.

Declaration
public static bool operator !=(ResourceItem item1, ResourceItem item2)
Parameters
Type Name Description
ResourceItem item1

The item on the left hand side of the operator.

ResourceItem item2

The item on the right hand side of the operator.

Returns
Type Description
System.Boolean

true if the first ResourceItem is not equal to the second ResourceItem; otherwise, false.

Implements

System.IEquatable<T>

Extension Methods