Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / SaveCardRequest.cs / 1 / SaveCardRequest.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.Collections; using System.IO; using System.Runtime.InteropServices; using System.Collections.Generic; class SaveCardRequest : UIAgentRequest { InfoCard m_card; public SaveCardRequest( IntPtr rpcHandle, Stream inArgs, Stream outArgs, ClientUIRequest parent ) : base( rpcHandle, inArgs, outArgs, parent ) { } protected override void OnInitializeAsSystem() { base.OnInitializeAsSystem(); } protected override void OnMarshalInArgs() { Stream stream = InArgs; m_card = new InfoCard( stream ); m_card.GetExtendedInformation().Deserialize( stream ); m_card.GetRPIdentityRequirement().Deserialize( stream ); m_card.GetClaims().Deserialize( stream ); } protected override void OnProcess() { if( null != m_card ) { StoreConnection connection = StoreConnection.GetConnection(); try { connection.BeginTransaction(); try { // // Set the last update time // m_card.LastUpdate = DateTime.UtcNow; m_card.Save( connection ); connection.CommitTransaction(); if( m_card.IsSelfIssued ) { AuditLog.AuditCardWritten(); } else { AuditLog.AuditCardImport(); } } catch { connection.RollbackTransaction(); throw; } } finally { connection.Close(); } } } protected override void OnMarshalOutArgs() { Stream stream = OutArgs; StoreConnection connection = StoreConnection.GetConnection(); try { m_card.AgentSerialize( stream, ( ParentRequest is GetTokenRequest ), GetPolicy(), connection, new System.Globalization.CultureInfo( ParentRequest.UserLanguage ) ); } finally { connection.Close(); } } } } // 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
- FontStretches.cs
- MarkupCompiler.cs
- ServicePointManagerElement.cs
- Hex.cs
- HttpDictionary.cs
- CompilationSection.cs
- BitmapCodecInfo.cs
- SequenceDesigner.cs
- BindableTemplateBuilder.cs
- EmbeddedMailObject.cs
- PageVisual.cs
- EventLogEntry.cs
- WsdlBuildProvider.cs
- InternalCache.cs
- TextPattern.cs
- SoapAttributeOverrides.cs
- Publisher.cs
- ExtensionSurface.cs
- NamespaceEmitter.cs
- GacUtil.cs
- TypeDelegator.cs
- RemoteWebConfigurationHostServer.cs
- SoapTypeAttribute.cs
- StringFreezingAttribute.cs
- xdrvalidator.cs
- ContextMenuAutomationPeer.cs
- InputLanguage.cs
- DocumentApplicationJournalEntry.cs
- SetterBaseCollection.cs
- DataGridViewAutoSizeModeEventArgs.cs
- ThreadAbortException.cs
- DesignBindingEditor.cs
- BindingGraph.cs
- VisualTreeUtils.cs
- CreateDataSourceDialog.cs
- Attribute.cs
- HttpPostedFile.cs
- DataBindingCollectionEditor.cs
- BooleanConverter.cs
- ResizeBehavior.cs
- ExceptionHandlers.cs
- IncrementalHitTester.cs
- Attributes.cs
- XmlCharCheckingWriter.cs
- ValueUnavailableException.cs
- ResourceSetExpression.cs
- ReadonlyMessageFilter.cs
- XmlSchemaAttributeGroup.cs
- PngBitmapDecoder.cs
- FontStretches.cs
- SecurityChannelFaultConverter.cs
- GlobalId.cs
- ContextMenuStripGroupCollection.cs
- WpfPayload.cs
- ExpressionsCollectionConverter.cs
- WeakReferenceList.cs
- AnimatedTypeHelpers.cs
- EventDrivenDesigner.cs
- View.cs
- PropertyReferenceSerializer.cs
- DataGridViewHeaderCell.cs
- ObjectHelper.cs
- MediaElement.cs
- HttpDebugHandler.cs
- AsyncInvokeContext.cs
- TaskExceptionHolder.cs
- ManagementOperationWatcher.cs
- ExpressionNormalizer.cs
- Types.cs
- BaseTemplateParser.cs
- FontFamilyConverter.cs
- HTTPNotFoundHandler.cs
- DataViewManager.cs
- StatusBar.cs
- RelationshipEnd.cs
- HttpInputStream.cs
- MethodBuilder.cs
- DesignerUtils.cs
- EnterpriseServicesHelper.cs
- ParameterToken.cs
- XmlILConstructAnalyzer.cs
- DocumentEventArgs.cs
- XmlName.cs
- MessagePartSpecification.cs
- DataColumnMappingCollection.cs
- EventProviderWriter.cs
- CellTreeNodeVisitors.cs
- ShortcutKeysEditor.cs
- DebugView.cs
- PropertyFilter.cs
- EventTrigger.cs
- ServiceOperationParameter.cs
- CodeValidator.cs
- HttpPostedFile.cs
- XappLauncher.cs
- ColorDialog.cs
- WizardStepBase.cs
- InputLanguageSource.cs
- WmlImageAdapter.cs
- ListViewItem.cs