Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetSatelliteContractVersion()

static ? Version System.Resources.ResourceManager.GetSatelliteContractVersion ( Assembly a)
inlinestaticprotected

Definition at line 413 of file ResourceManager.cs.

414 {
415 if (a == null)
416 {
417 throw new ArgumentNullException("a", SR.ArgumentNull_Assembly);
418 }
419 string text = a.GetCustomAttribute<SatelliteContractVersionAttribute>()?.Version;
420 if (text == null)
421 {
422 return null;
423 }
424 if (!Version.TryParse(text, out Version result))
425 {
426 throw new ArgumentException(SR.Format(SR.Arg_InvalidSatelliteContract_Asm_Ver, a, text));
427 }
428 return result;
429 }

References System.SR.Arg_InvalidSatelliteContract_Asm_Ver, System.SR.ArgumentNull_Assembly, System.SR.Format(), System.text, and System.Version.TryParse().

Referenced by System.Resources.ResourceManager.ResourceManagerMediator.ObtainSatelliteContractVersion().