Table of Contents

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

id int

The ID number

name string

The associated name

Properties

Id

The ID

public int Id { get; }

Property Value

int

Name

The name, null is none

public string Name { get; }

Property Value

string

Methods

Equals(EventId)

Check if this EvetnId have the same Id as the other one

public bool Equals(EventId other)

Parameters

other EventId

The 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

obj object

The 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

left EventId

EventId left to compare

right EventId

EvetnId right to compare

Returns

bool

True if equal

implicit operator EventId(int)

Implicitly convert int to EnvetId

public static implicit operator EventId(int i)

Parameters

i int

Returns

EventId

operator !=(EventId, EventId)

non equal operator

public static bool operator !=(EventId left, EventId right)

Parameters

left EventId

EventId left to compare

right EventId

EvetnId right to compare

Returns

bool

True if not equal