forked from microsoft/referencesource
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSecurityTokenReferenceStyle.cs
More file actions
33 lines (28 loc) · 1.01 KB
/
Copy pathSecurityTokenReferenceStyle.cs
File metadata and controls
33 lines (28 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//-----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace System.ServiceModel.Security.Tokens
{
using System;
using System.ComponentModel;
public enum SecurityTokenReferenceStyle
{
Internal = 0,
External = 1,
}
static class TokenReferenceStyleHelper
{
public static bool IsDefined(SecurityTokenReferenceStyle value)
{
return (value == SecurityTokenReferenceStyle.External || value == SecurityTokenReferenceStyle.Internal);
}
public static void Validate(SecurityTokenReferenceStyle value)
{
if (!IsDefined(value))
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidEnumArgumentException("value", (int)value,
typeof(SecurityTokenReferenceStyle)));
}
}
}
}