Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Client / System / IdentityModel / Selectors / CardSpaceException.cs / 1 / CardSpaceException.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IdentityModel.Selectors { using System; using System.Runtime.Serialization; using Microsoft.InfoCards.Diagnostics; using IDT=Microsoft.InfoCards.Diagnostics.InfoCardTrace; using Microsoft.InfoCards; internal static class ExceptionHelper { public static void ThrowIfCardSpaceException( int status ) { switch( status ) { case (int)EventCode.E_ICARD_COMMUNICATION: throw IDT.ThrowHelperError( new CardSpaceException( SR.GetString( SR.ClientAPIInfocardError ) ) ); case (int)EventCode.E_ICARD_USERCANCELLED: throw IDT.ThrowHelperError( new UserCancellationException( SR.GetString( SR.ClientAPIUserCancellationError ) ) ); case (int)EventCode.E_ICARD_SERVICE: throw IDT.ThrowHelperError( new ServiceNotStartedException( SR.GetString( SR.ClientAPIServiceNotStartedError ) ) ); case (int)EventCode.E_ICARD_UNTRUSTED: throw IDT.ThrowHelperError( new UntrustedRecipientException( SR.GetString( SR.ClientAPIUntrustedRecipientError ) ) ); case (int)EventCode.E_ICARD_TRUSTEXCHANGE: throw IDT.ThrowHelperError( new StsCommunicationException( SR.GetString( SR.ClientStsCommunicationException ) ) ); case (int)EventCode.E_ICARD_IDENTITY: throw IDT.ThrowHelperError( new IdentityValidationException( SR.GetString( SR.ClientAPIInvalidIdentity ) ) ); case (int)EventCode.E_ICARD_SERVICEBUSY: throw IDT.ThrowHelperError( new ServiceBusyException( SR.GetString( SR.ClientAPIServiceBusy ) ) ); case (int)EventCode.E_ICARD_POLICY: throw IDT.ThrowHelperError( new PolicyValidationException( SR.GetString( SR.ClientAPIInvalidPolicy ) ) ); case (int)EventCode.E_ICARD_UNSUPPORTED: throw IDT.ThrowHelperError( new UnsupportedPolicyOptionsException( SR.GetString( SR.ClientAPIUnsupportedPolicyOptions ) ) ); case ( int ) EventCode.E_ICARD_UI_INITIALIZATION: throw IDT.ThrowHelperError( new UIInitializationException( SR.GetString( SR.ClientAPIUIInitializationFailed ) ) ); case ( int ) EventCode.E_ICARD_IMPORT: throw IDT.ThrowHelperError( new CardSpaceException( SR.GetString( SR.ClientAPICannotImport ) ) ); default: // // In current implementation, caller will determine what to do in the default case. // ; break; } } } // // Summary // Generic Infocard Exception class used to indicate failures in teh Infocard system // [Serializable] public class CardSpaceException : System.Exception { public CardSpaceException() : base() { } public CardSpaceException( string message ) : base( message ) { } public CardSpaceException( string message, Exception innerException ) : base( message, innerException ) { } protected CardSpaceException( SerializationInfo info, StreamingContext context ) : base( info, context ) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StringBuilder.cs
- StringDictionaryEditor.cs
- Win32Exception.cs
- XmlAnyAttributeAttribute.cs
- TableLayoutStyleCollection.cs
- SharedUtils.cs
- WarningException.cs
- ActivationServices.cs
- EntityCommandCompilationException.cs
- SoapCodeExporter.cs
- PlaceHolder.cs
- AQNBuilder.cs
- basecomparevalidator.cs
- BindingMemberInfo.cs
- TrackingServices.cs
- DockPattern.cs
- BStrWrapper.cs
- ipaddressinformationcollection.cs
- HttpListenerElement.cs
- SystemResources.cs
- Semaphore.cs
- ColumnResizeUndoUnit.cs
- CLSCompliantAttribute.cs
- WorkflowPageSetupDialog.cs
- EntityDesignerUtils.cs
- OleTxTransactionInfo.cs
- CollectionChangedEventManager.cs
- SupportsEventValidationAttribute.cs
- SecurityContextSecurityTokenResolver.cs
- dataobject.cs
- TextTreeRootNode.cs
- SemanticTag.cs
- AppliedDeviceFiltersEditor.cs
- Reference.cs
- InstallerTypeAttribute.cs
- DocumentOutline.cs
- ManualResetEvent.cs
- AppDomainProtocolHandler.cs
- RefType.cs
- HuffCodec.cs
- HttpCachePolicyElement.cs
- RawStylusActions.cs
- DebugHandleTracker.cs
- MatrixTransform.cs
- indexingfiltermarshaler.cs
- MbpInfo.cs
- DbProviderSpecificTypePropertyAttribute.cs
- UriParserTemplates.cs
- DataGridViewIntLinkedList.cs
- LifetimeMonitor.cs
- DataGridColumn.cs
- BaseValidator.cs
- DataGrid.cs
- XmlnsPrefixAttribute.cs
- AudioDeviceOut.cs
- UnmanagedMemoryStream.cs
- StyleBamlRecordReader.cs
- RoutedUICommand.cs
- ObjectMemberMapping.cs
- TypeInfo.cs
- DoubleLink.cs
- SQLResource.cs
- XmlRootAttribute.cs
- TypeToArgumentTypeConverter.cs
- WebServiceReceive.cs
- ProxyGenerationError.cs
- Lasso.cs
- NullExtension.cs
- CommonServiceBehaviorElement.cs
- Iis7Helper.cs
- XslCompiledTransform.cs
- Size.cs
- ResourceAssociationSet.cs
- AnnouncementClient.cs
- InvalidCastException.cs
- ThreadInterruptedException.cs
- DecoderExceptionFallback.cs
- StringBuilder.cs
- OpCellTreeNode.cs
- BrowserCapabilitiesFactoryBase.cs
- CallbackValidatorAttribute.cs
- GeometryHitTestResult.cs
- SplashScreen.cs
- PerformanceCounters.cs
- ToolZone.cs
- ItemList.cs
- SrgsElement.cs
- OleDbPropertySetGuid.cs
- ValueTypeFixupInfo.cs
- KeyValuePair.cs
- TextServicesLoader.cs
- RegexParser.cs
- IDictionary.cs
- SqlTypesSchemaImporter.cs
- BooleanConverter.cs
- BindableTemplateBuilder.cs
- nulltextcontainer.cs
- ImageCodecInfoPrivate.cs
- HtmlHistory.cs
- SecurityTokenResolver.cs