EnumParser
Class in BIM.works_SDK.
API catalogue · BIM.works_SDK · Class
.NET#
public class EnumParserReads enum values sent by the server. The server adds enum values over time (new disciplines, node types, statuses), so a name this SDK version does not know gives the fallback instead of an exception.
Inheritance and interfaces#
System.Object
Members#
| Member | Kind | Description |
|---|---|---|
| Parse(Type, string) | Method | The enum constant named value of enumType, or null when enumType has no such constant |
| Parse<T>(string, T) | Method | |
| Parse<T>(JsonElement, string, T) | Method | Parses the string property name of json; the fallback when the property is absent, null or unknown |
Parse(Type, string)#
.NET#
public static Enum Parse(Type enumType, string value)The enum constant named value of enumType, or null when enumType has no such constant
Parameters#
| Name | Type | Description |
|---|---|---|
enumType |
System.Type |
|
value |
System.String |
Parse<T>(string, T)#
.NET#
public static T Parse<T>(string value, T fallback) where T : structType parameters#
| Name | Constraint | Description |
|---|---|---|
T |
`` |
Parameters#
| Name | Type | Description |
|---|---|---|
value |
System.String |
|
fallback |
{T} |
Parse<T>(JsonElement, string, T)#
.NET#
public static T Parse<T>(JsonElement json, string name, T fallback) where T : structParses the string property name of json; the fallback when the property is absent, null or unknown
Type parameters#
| Name | Constraint | Description |
|---|---|---|
T |
`` |
Parameters#
| Name | Type | Description |
|---|---|---|
json |
System.Text.Json.JsonElement |
|
name |
System.String |
|
fallback |
{T} |
Inherited members#
System.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseCloneSystem.Object.ReferenceEquals(System.Object,System.Object)System.Object.ToString