Show / Hide Table of Contents

Class ChampionUtils

Inheritance
System.Object
ChampionUtils
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: MingweiSamuel.Camille.Enums
Assembly: Camille.dll
Syntax
public static class ChampionUtils

Methods

| Improve this Doc View Source

Identifier(Champion, Boolean)

Returns the champion's string identifier.

This is generally the same as their Name with spaces and symbols removed with notable exceptions in "MonkeyKing" (Wu Kong) and "Nunu" (Nunu & Willump).

Declaration
public static string Identifier(this Champion val, bool throwOnUnknown = false)
Parameters
Type Name Description
Champion val

The Champion value.

System.Boolean throwOnUnknown

If false (default), will return "UNKNOWN" on unknown champions. If true, throws an InvalidOperationException on unknown champions.

Returns
Type Description
System.String

Champion's string identifier or "UNKNOWN".

| Improve this Doc View Source

Name(Champion, Boolean)

Return's the champion's human-readable name (en-US).

Declaration
public static string Name(this Champion val, bool throwOnUnknown = false)
Parameters
Type Name Description
Champion val

The Champion value.

System.Boolean throwOnUnknown

If false (default), will return "UNKNOWN" on unknown champions. If true, throws an InvalidOperationException on unknown champions.

Returns
Type Description
System.String

Champion's name or "UNKNOWN".

| Improve this Doc View Source

Parse(String, Boolean)

Return's the Champion corresponding to a champion's string identifier or (en-US) name.

This method will only look at the first four alphabetic characters in the given string.

Declaration
public static Champion Parse(string val, bool throwOnUnknown = false)
Parameters
Type Name Description
System.String val

The string identifier or name. Only the first four alphabetic characters will be looked at.

System.Boolean throwOnUnknown

If false (default), will return 0 on unknown strings. If true, throws an InvalidOperationException on unknown strings.

Returns
Type Description
Champion

Champion enum or 0.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX