Show / Hide Table of Contents

Class ComplexKey

Multi-element container that implements by-value comparison semantics and Hashcode caching; for use in Dictionary where you need an efficient, dynamic key. It only works if you consider it immutable and don't change the underlying objects!

Inheritance
object
ComplexKey
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.Util
Assembly: SoCore.dll
Syntax
public class ComplexKey

Constructors

ComplexKey(object[])

Create immutable instance with given values

Declaration
public ComplexKey(object[] keys)
Parameters
Type Name Description
object[] keys

Properties

Keys

The fields of the key

Declaration
public IEnumerable<object> Keys { get; }
Property Value
Type Description
IEnumerable<object>

Methods

Equals(object)

Override: By-value comparison semantics

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
object.Equals(object)

GetHashCode()

Override: return cached hashcode rather than recalculating all the time.

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
object.GetHashCode()

ToString()

Override for debugging

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top