Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Tokens / SecurityKeyType.cs / 1305376 / SecurityKeyType.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.IdentityModel.Tokens { using System.ComponentModel; using System.Diagnostics; public enum SecurityKeyType { SymmetricKey, AsymmetricKey, BearerKey } static class SecurityKeyTypeHelper { internal static bool IsDefined(SecurityKeyType value) { return (value == SecurityKeyType.SymmetricKey || value == SecurityKeyType.AsymmetricKey || value == SecurityKeyType.BearerKey); } internal static void Validate(SecurityKeyType value) { if (!IsDefined(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidEnumArgumentException("value", (int)value, typeof(SecurityKeyType))); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.IdentityModel.Tokens { using System.ComponentModel; using System.Diagnostics; public enum SecurityKeyType { SymmetricKey, AsymmetricKey, BearerKey } static class SecurityKeyTypeHelper { internal static bool IsDefined(SecurityKeyType value) { return (value == SecurityKeyType.SymmetricKey || value == SecurityKeyType.AsymmetricKey || value == SecurityKeyType.BearerKey); } internal static void Validate(SecurityKeyType value) { if (!IsDefined(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidEnumArgumentException("value", (int)value, typeof(SecurityKeyType))); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ParallelForEach.cs
- OrderByQueryOptionExpression.cs
- Compress.cs
- HttpResponseHeader.cs
- HtmlValidatorAdapter.cs
- AdapterUtil.cs
- ModuleBuilder.cs
- ActivityMetadata.cs
- StrokeIntersection.cs
- StylusPoint.cs
- VerificationAttribute.cs
- KnownBoxes.cs
- XmlHelper.cs
- XsdDuration.cs
- ComplexPropertyEntry.cs
- xmlfixedPageInfo.cs
- OdbcException.cs
- ClientRoleProvider.cs
- AssemblyResourceLoader.cs
- XmlReflectionImporter.cs
- CriticalFinalizerObject.cs
- GradientStop.cs
- MailDefinition.cs
- DataGridViewSelectedCellCollection.cs
- HandoffBehavior.cs
- RemotingAttributes.cs
- ObjectListField.cs
- Point3DCollectionConverter.cs
- BuildProvider.cs
- DesignerWidgets.cs
- ProtectedConfigurationProviderCollection.cs
- AccessedThroughPropertyAttribute.cs
- ExtensibleClassFactory.cs
- DataGridViewLinkCell.cs
- DateTimeConverter2.cs
- BinaryReader.cs
- TypedTableGenerator.cs
- IxmlLineInfo.cs
- ModulesEntry.cs
- PageCatalogPart.cs
- FontUnit.cs
- SqlAliaser.cs
- Maps.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- TypeInfo.cs
- Merger.cs
- MessageFilterException.cs
- DrawingVisual.cs
- ActiveDocumentEvent.cs
- HitTestParameters3D.cs
- ToolboxItemFilterAttribute.cs
- ColumnCollection.cs
- SettingsPropertyCollection.cs
- ImpersonationContext.cs
- StrokeIntersection.cs
- BlockUIContainer.cs
- PeerNeighborManager.cs
- PropertyGridCommands.cs
- ByteStack.cs
- XmlCompatibilityReader.cs
- TextContainerHelper.cs
- EncoderParameter.cs
- remotingproxy.cs
- HitTestFilterBehavior.cs
- WebZone.cs
- StringKeyFrameCollection.cs
- FillErrorEventArgs.cs
- PersonalizationProvider.cs
- MemoryFailPoint.cs
- ConfigXmlSignificantWhitespace.cs
- XmlArrayItemAttributes.cs
- RegisteredHiddenField.cs
- FixedPageAutomationPeer.cs
- DataColumnPropertyDescriptor.cs
- WebPartsSection.cs
- RenderData.cs
- XmlSchemaSimpleContentRestriction.cs
- DaylightTime.cs
- Run.cs
- InheritanceAttribute.cs
- AuthenticationConfig.cs
- StreamReader.cs
- XhtmlMobileTextWriter.cs
- RegexGroup.cs
- PluralizationService.cs
- Msec.cs
- DisposableCollectionWrapper.cs
- ConstraintStruct.cs
- WrappedIUnknown.cs
- TextBoxLine.cs
- TextEditorTables.cs
- Int16.cs
- MailDefinition.cs
- AdapterDictionary.cs
- NamedElement.cs
- DataGridViewTextBoxCell.cs
- ConnectionInterfaceCollection.cs
- Image.cs
- WmlValidatorAdapter.cs
- ComponentDispatcher.cs