Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / CloseCryptoHandleRequest.cs / 1 / CloseCryptoHandleRequest.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.Collections; using System.Diagnostics; using System.Threading; //ManualResetEvent using System.ComponentModel; //Win32Exception using System.IO; //Stream using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace; using System.Security.Principal; // // Summary: // Handles a request to close a CryptoSession. // class CloseCryptoHandleRequest : ClientRequest { // // The cryptosession id we are attaching to. // int m_cryptoSession; // // Sumamry: // Construct an CloseCryptoHandleRequest object // // Arguments: // callingProcess - The process in which the caller originated. // callingIdentity - The WindowsIdentity of the caller // rpcHandle - The handle of the native RPC request // inArgs - The stream to read input data from // outArgs - The stream to write output data to // public CloseCryptoHandleRequest( Process callingProcess, WindowsIdentity callingIdentity, IntPtr rpcHandle, Stream inArgs, Stream outArgs ) : base( callingProcess, callingIdentity, rpcHandle, inArgs, outArgs ) { IDT.TraceDebug( "Intiating an CloseCryptoHandleRequest request" ); } protected override void OnMarshalInArgs() { IDT.DebugAssert( null != InArgs, "null inargs" ); BinaryReader reader = new InfoCardBinaryReader( InArgs ); m_cryptoSession = reader.ReadInt32(); IDT.ThrowInvalidArgumentConditional( 0 == m_cryptoSession, "cryptoSession" ); } protected override void OnMarshalOutArgs() { } // // Summary // Closes a cryptoSession. // protected override void OnProcess() { CryptoSession session = CryptoSession.Find( m_cryptoSession, CallerPid, RequestorIdentity.User ); session.Dispose(); } } } // 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
- MultiTrigger.cs
- CustomCredentialPolicy.cs
- CodeNamespaceImportCollection.cs
- SessionStateModule.cs
- MsmqHostedTransportManager.cs
- SmiRequestExecutor.cs
- TextRunProperties.cs
- DataControlCommands.cs
- DecimalAnimationBase.cs
- ZoneButton.cs
- OdbcDataReader.cs
- AnnotationService.cs
- SerializerWriterEventHandlers.cs
- BooleanExpr.cs
- GradientBrush.cs
- ScrollEvent.cs
- ListSortDescription.cs
- DecoderBestFitFallback.cs
- DictionaryContent.cs
- MULTI_QI.cs
- MobileControlsSection.cs
- ChildDocumentBlock.cs
- TabControl.cs
- CryptoStream.cs
- IntPtr.cs
- Operator.cs
- ListBox.cs
- TypeInfo.cs
- URLIdentityPermission.cs
- RuntimeWrappedException.cs
- AutomationAttributeInfo.cs
- EncryptedData.cs
- QuaternionValueSerializer.cs
- _NegotiateClient.cs
- TextDecoration.cs
- LazyTextWriterCreator.cs
- RectangleConverter.cs
- Margins.cs
- CodeRegionDirective.cs
- MailBnfHelper.cs
- DbResourceAllocator.cs
- Nullable.cs
- TaskCanceledException.cs
- PagerStyle.cs
- HashCryptoHandle.cs
- DataServiceHostFactory.cs
- DialogResultConverter.cs
- MimeXmlReflector.cs
- CurrencyManager.cs
- CriticalExceptions.cs
- HtmlWindowCollection.cs
- XmlSchemaElement.cs
- ParameterElementCollection.cs
- WebService.cs
- SafeFindHandle.cs
- ColumnTypeConverter.cs
- SessionStateItemCollection.cs
- SubpageParagraph.cs
- ContentFileHelper.cs
- ImageAttributes.cs
- RectConverter.cs
- Parameter.cs
- AsyncOperationManager.cs
- ComponentChangedEvent.cs
- TextServicesDisplayAttributePropertyRanges.cs
- MsmqIntegrationBindingElement.cs
- XmlSchemaAnnotation.cs
- FrameDimension.cs
- RoutedCommand.cs
- MILUtilities.cs
- ScalarRestriction.cs
- TemplateControl.cs
- ParameterCollection.cs
- Site.cs
- RealProxy.cs
- UpDownBase.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- TextBoxBase.cs
- NotFiniteNumberException.cs
- ChtmlTextWriter.cs
- SystemColorTracker.cs
- MultiSelectRootGridEntry.cs
- Triangle.cs
- ConfigPathUtility.cs
- SplashScreenNativeMethods.cs
- Tokenizer.cs
- DataMisalignedException.cs
- FileStream.cs
- ElementHostAutomationPeer.cs
- ActivityMetadata.cs
- DbProviderSpecificTypePropertyAttribute.cs
- RequestQueryProcessor.cs
- BounceEase.cs
- DefaultAuthorizationContext.cs
- Menu.cs
- ToolStripKeyboardHandlingService.cs
- ControlIdConverter.cs
- GeometryHitTestResult.cs
- DataGridViewCellCancelEventArgs.cs
- BrowserCapabilitiesCodeGenerator.cs