Class Key<T>
- Namespace
- Quartz
- Assembly
- Quartz.dll
Object representing a job or trigger key.
[Serializable]
public class Key<T> : IComparable<Key<T>>, IComparable, IEquatable<Key<T>>
Type Parameters
T
- Inheritance
-
Key<T>
- Implements
-
IComparable<Key<T>>IEquatable<Key<T>>
- Derived
- Inherited Members
Constructors
Key(string)
Construct a new key with the given name and DefaultGroup as group.
public Key(string name)
Parameters
namestringthe name
Exceptions
- ArgumentNullException
nameis null.
Key(string, string)
Construct a new key with the given name and group.
public Key(string name, string group)
Parameters
Exceptions
- ArgumentNullException
nameorgroupare null.
Fields
DefaultGroup
The default group for scheduling entities, with the value "DEFAULT".
public const string DefaultGroup = "DEFAULT"
Field Value
Properties
Group
Get the group portion of the key.
public string Group { get; }
Property Value
- string
the group
Name
Get the name portion of the key.
public string Name { get; }
Property Value
- string
the name
Methods
CompareTo(Key<T>?)
Orders keys by group and then name, ordinally, with DefaultGroup sorting before every other group.
public int CompareTo(Key<T>? other)
Parameters
otherKey<T>
Returns
Equals(Key<T>?)
Whether this key and other name the same thing.
public bool Equals(Key<T>? other)
Parameters
otherKey<T>The key to compare with.
Returns
- bool
true when the two are the same runtime type and both the name and the group are equal, ordinally.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Return the string representation of the key. The format will be: <group>.<name>.
public override string ToString()
Returns
- string
the string representation of the key
Operators
operator ==(Key<T>?, Key<T>?)
Whether two keys name the same thing.
public static bool operator ==(Key<T>? left, Key<T>? right)
Parameters
Returns
operator >(Key<T>, Key<T>)
Whether left sorts after right: by group, then by
name, ordinally.
public static bool operator >(Key<T> left, Key<T> right)
Parameters
Returns
operator >=(Key<T>, Key<T>)
Whether left sorts after right or equals it.
public static bool operator >=(Key<T> left, Key<T> right)
Parameters
Returns
operator !=(Key<T>?, Key<T>?)
Whether two keys name different things.
public static bool operator !=(Key<T>? left, Key<T>? right)
Parameters
Returns
operator <(Key<T>, Key<T>)
Whether left sorts before right: by group, then by
name, ordinally.
public static bool operator <(Key<T> left, Key<T> right)
Parameters
Returns
operator <=(Key<T>, Key<T>)
Whether left sorts before right or equals it.
public static bool operator <=(Key<T> left, Key<T> right)