Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / infocard / Client / System / IdentityModel / Selectors / CardSpaceException.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PageThemeCodeDomTreeGenerator.cs
- ConfigurationConverterBase.cs
- ResolveMatchesMessage11.cs
- SaveFileDialogDesigner.cs
- XmlArrayItemAttribute.cs
- WebPartCatalogAddVerb.cs
- Freezable.cs
- HitTestParameters.cs
- GeneralTransform3DTo2DTo3D.cs
- XmlMemberMapping.cs
- RectangleF.cs
- MetafileHeader.cs
- SourceFileInfo.cs
- FirewallWrapper.cs
- OperatingSystem.cs
- DoubleUtil.cs
- ScaleTransform3D.cs
- CommandDevice.cs
- XmlCustomFormatter.cs
- DataTableMapping.cs
- ColorTranslator.cs
- ContextStaticAttribute.cs
- GeometryModel3D.cs
- WebConfigurationHostFileChange.cs
- QueryInterceptorAttribute.cs
- Util.cs
- MemberBinding.cs
- TdsParserSessionPool.cs
- TextTreeDeleteContentUndoUnit.cs
- DataServiceKeyAttribute.cs
- SettingsPropertyWrongTypeException.cs
- LinkDescriptor.cs
- DataServiceProviderMethods.cs
- WorkflowTransactionService.cs
- AstNode.cs
- EntityFunctions.cs
- ReliableOutputConnection.cs
- OperationContractAttribute.cs
- ViewgenContext.cs
- FontClient.cs
- PrintingPermissionAttribute.cs
- WizardPanelChangingEventArgs.cs
- TrustManagerPromptUI.cs
- UnsafeNativeMethods.cs
- Command.cs
- Light.cs
- DiagnosticTrace.cs
- ExpressionWriter.cs
- validationstate.cs
- MsmqIntegrationProcessProtocolHandler.cs
- RegexWorker.cs
- _SslStream.cs
- DataGridViewSelectedCellCollection.cs
- TreeViewDataItemAutomationPeer.cs
- ParameterExpression.cs
- XmlILOptimizerVisitor.cs
- GeneralTransform3DTo2DTo3D.cs
- IpcManager.cs
- WebEventCodes.cs
- CompilerWrapper.cs
- ThicknessAnimationBase.cs
- Tag.cs
- EventTrigger.cs
- MsmqBindingElementBase.cs
- ReverseComparer.cs
- CapabilitiesState.cs
- RawKeyboardInputReport.cs
- HtmlElement.cs
- NavigationCommands.cs
- DeviceContext2.cs
- IconHelper.cs
- FormView.cs
- SeverityFilter.cs
- QuestionEventArgs.cs
- Accessible.cs
- FieldToken.cs
- SspiNegotiationTokenAuthenticator.cs
- OracleConnectionString.cs
- OperationFormatUse.cs
- TrustManagerPromptUI.cs
- XmlConverter.cs
- PagedDataSource.cs
- HelpInfo.cs
- ListViewDeletedEventArgs.cs
- xmlfixedPageInfo.cs
- AttachedAnnotation.cs
- DictionaryContent.cs
- FrameworkObject.cs
- SystemNetworkInterface.cs
- StreamInfo.cs
- iisPickupDirectory.cs
- NameValueCollection.cs
- EntityProviderServices.cs
- CustomErrorCollection.cs
- DbCommandTree.cs
- VersionedStreamOwner.cs
- MailAddress.cs
- WebRequestModuleElement.cs
- Int16.cs
- RelOps.cs