Пример #1
0
 //checks if JSON mapping from request body is set up correctly
 //and is of minimum name length
 public bool CharEntryIsValid(Character ch)
 {
     return valid_char_entry.IsMatch(ch.name)
         && StringIsValid(new string[]
       {
       ch.name,
     ch.faction,
     ch.race,
     ch.@class
       }, MIN_ENTRY_LENGTH, MAX_STR_LENGTH);
 }
Пример #2
0
 public void UpdateCasing(Character c)
 {
     c.name = FirstToUpper(c.name.ToLower());
     c.faction = FirstToUpper(c.faction.ToLower());
     c.@class = UpdateTitleCase(c.@class);
     c.race = UpdateTitleCase(c.race);
 }