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
- GridEntry.cs
- SafeSecurityHandles.cs
- FontStretchConverter.cs
- InvalidAsynchronousStateException.cs
- Table.cs
- DbDataAdapter.cs
- GridViewColumn.cs
- SqlUserDefinedTypeAttribute.cs
- X509CertificateChain.cs
- DirectionalAction.cs
- PersonalizationProvider.cs
- TreeViewItemAutomationPeer.cs
- MessageSecurityException.cs
- FieldTemplateUserControl.cs
- BufferedReadStream.cs
- EventEntry.cs
- Tuple.cs
- ReliableChannelListener.cs
- XmlIlGenerator.cs
- EllipseGeometry.cs
- WebPartMenu.cs
- StrokeNode.cs
- ClipboardData.cs
- FrameworkObject.cs
- SqlCommandSet.cs
- Drawing.cs
- ButtonRenderer.cs
- OleDbInfoMessageEvent.cs
- DoubleKeyFrameCollection.cs
- DataControlHelper.cs
- SafeViewOfFileHandle.cs
- IpcClientManager.cs
- EqualityComparer.cs
- ResXResourceReader.cs
- Atom10FormatterFactory.cs
- ReachObjectContext.cs
- DesignerLoader.cs
- HttpFormatExtensions.cs
- ZoneLinkButton.cs
- ListViewPagedDataSource.cs
- DataGrid.cs
- MethodBuilder.cs
- TextServicesDisplayAttributePropertyRanges.cs
- Partitioner.cs
- ServiceEndpoint.cs
- BooleanStorage.cs
- BaseValidator.cs
- SqlRemoveConstantOrderBy.cs
- remotingproxy.cs
- ComNativeDescriptor.cs
- RectangleGeometry.cs
- UnsafeNativeMethods.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- ActiveXSite.cs
- ToggleButtonAutomationPeer.cs
- IArgumentProvider.cs
- KeyGestureValueSerializer.cs
- ResourceProviderFactory.cs
- Pen.cs
- DbConnectionPoolGroupProviderInfo.cs
- InputReportEventArgs.cs
- SQLMoney.cs
- PeerNameRecordCollection.cs
- httpserverutility.cs
- UnescapedXmlDiagnosticData.cs
- SchemaLookupTable.cs
- DrawListViewItemEventArgs.cs
- BitmapEffectRenderDataResource.cs
- GrammarBuilderWildcard.cs
- FrameworkElementFactoryMarkupObject.cs
- CalendarDay.cs
- RootDesignerSerializerAttribute.cs
- SynchronizedMessageSource.cs
- DataGridViewControlCollection.cs
- InputLangChangeEvent.cs
- Border.cs
- EntityParameter.cs
- MembershipSection.cs
- ZipFileInfo.cs
- CodeExpressionStatement.cs
- Margins.cs
- DataMemberFieldConverter.cs
- RegisterInfo.cs
- XPathNavigatorKeyComparer.cs
- SimpleTypesSurrogate.cs
- DashStyle.cs
- PocoPropertyAccessorStrategy.cs
- TargetException.cs
- basenumberconverter.cs
- PriorityQueue.cs
- AgileSafeNativeMemoryHandle.cs
- SemanticResolver.cs
- ResponseBodyWriter.cs
- ServiceNotStartedException.cs
- BoundPropertyEntry.cs
- XmlUtil.cs
- HashJoinQueryOperatorEnumerator.cs
- DataTableExtensions.cs
- SystemInformation.cs
- QueueProcessor.cs