Struct EventId
- Namespace
- Microsoft.Extensions.Logging
- Assembly
- nanoFramework.Logging.dll
Event Id structure
public readonly struct EventId
- Inherited Members
- Extension Methods
Constructors
EventId(int, string)
Creates an EventId
public EventId(int id, string name = null)
Parameters
Properties
Id
The ID
public int Id { get; }
Property Value
Name
The name, null is none
public string Name { get; }
Property Value
Methods
Equals(EventId)
Check if this EvetnId have the same Id as the other one
public bool Equals(EventId other)
Parameters
otherEventIdThe EvetnId to compare
Returns
- bool
True if Id is equal
Equals(object)
Check if this EventId is the same object as the other one
public override bool Equals(object obj)
Parameters
objobjectThe EventId to compare
Returns
- bool
True if equal
GetHashCode()
Get the hash code
public override int GetHashCode()
Returns
- int
ID is the hash code
ToString()
Convert to string
public override string ToString()
Returns
- string
The name or ID if name is null
Operators
operator ==(EventId, EventId)
Equal operator
public static bool operator ==(EventId left, EventId right)
Parameters
Returns
- bool
True if equal
implicit operator EventId(int)
Implicitly convert int to EnvetId
public static implicit operator EventId(int i)
Parameters
iint
Returns
operator !=(EventId, EventId)
non equal operator
public static bool operator !=(EventId left, EventId right)
Parameters
Returns
- bool
True if not equal