Commit 7c8d867
committed
refactor(audience-sdk): introduce IdentityTypeExtensions.ParseLowercaseString
Adds the inverse of ToLowercaseString so callers reading user-supplied or wire-format identity
strings can round-trip back into the enum without hand-rolling another switch.
- IdentityType.cs: adds IdentityTypeExtensions.ParseLowercaseString, the case-insensitive inverse of
ToLowercaseString. Falls back to Custom for unknown / empty values; never throws.
- AudienceSample.cs: ParseIdentityType reverse mapper delegates to
IdentityTypeExtensions.ParseLowercaseString instead of hand-rolling its own switch.1 parent 426ff4b commit 7c8d867
2 files changed
Lines changed: 15 additions & 11 deletions
File tree
- examples/audience/Assets/SampleApp/Scripts
- src/Packages/Audience/Runtime
Lines changed: 2 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
| 378 | + | |
| 379 | + | |
389 | 380 | | |
390 | 381 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
59 | 72 | | |
60 | 73 | | |
0 commit comments