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

◆ OpenExisting()

static Semaphore System.Threading.Semaphore.OpenExisting ( string name)
inlinestatic

Definition at line 39 of file Semaphore.cs.

40 {
41 Semaphore result;
42 return OpenExistingWorker(name, out result) switch
43 {
44 OpenExistingResult.NameNotFound => throw new WaitHandleCannotBeOpenedException(),
45 OpenExistingResult.NameInvalid => throw new WaitHandleCannotBeOpenedException(SR.Format(SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle, name)),
46 OpenExistingResult.PathNotFound => throw new IOException(SR.Format(SR.IO_PathNotFound_Path, name)),
47 _ => result,
48 };
49 }
Semaphore(int initialCount, int maximumCount)
Definition Semaphore.cs:11
static OpenExistingResult OpenExistingWorker(string name, out Semaphore result)
Definition Semaphore.cs:92

References System.SR.Format(), System.SR.IO_PathNotFound_Path, System.Threading.Semaphore.OpenExistingWorker(), and System.SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle.