Gets the preset of the given name (ignore case search) or returns null if cannot find it. The preset name. Found preset or null if is missing.
(string name)
| 50 | /// <param name="name">The preset name.</param> |
| 51 | /// <returns>Found preset or null if is missing.</returns> |
| 52 | public BuildPreset GetPreset(string name) |
| 53 | { |
| 54 | if (Presets != null) |
| 55 | { |
| 56 | for (int i = 0; i < Presets.Length; i++) |
| 57 | { |
| 58 | if (string.Equals(Presets[i].Name, name, StringComparison.OrdinalIgnoreCase)) |
| 59 | return Presets[i]; |
| 60 | } |
| 61 | } |
| 62 | return null; |
| 63 | } |
| 64 | #endif |
| 65 | } |
| 66 | } |