Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / GetCertificateRequest.cs / 1 / GetCertificateRequest.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.IO; using System.Security.Cryptography.X509Certificates; using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace; // // Summary // Requests the certificate for the specified recipient. // internal class GetCertificateRequest : UIAgentRequest { string m_recipientIdentifier; // Stores the recipient identifier. X509Certificate2 m_certificate; // Stores reference to the certificate. public GetCertificateRequest( IntPtr rpcHandle, Stream inArgs, Stream outArgs, ClientUIRequest parent ) : base( rpcHandle, inArgs, outArgs, parent ) { } // // Summary // Reads the recipient identifier from the argument stream. // protected override void OnMarshalInArgs() { BinaryReader reader = new BinaryReader( InArgs, System.Text.Encoding.Unicode ); m_recipientIdentifier = Utility.DeserializeString( reader ); } // // Summary // Retrieves the certificate from the cache. // protected override void OnProcess() { m_certificate = ParentRequest.CertCacheFind( m_recipientIdentifier ); if( null == m_certificate ) { throw IDT.ThrowHelperError( new InfoCardArgumentException( SR.GetString( SR.NoCachedCertificateForRecipient ) ) ); } } // // Summary // Writes the encoded certificate to the argument stream. // protected override void OnMarshalOutArgs() { BinaryWriter writer = new BinaryWriter( OutArgs, System.Text.Encoding.Unicode ); Utility.SerializeBytes( writer, m_certificate.GetRawCertData() ); } } } // 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
- ObjectConverter.cs
- TdsParserHelperClasses.cs
- TabPage.cs
- Context.cs
- AspNetHostingPermission.cs
- HtmlImage.cs
- MD5CryptoServiceProvider.cs
- DocumentEventArgs.cs
- SwitchAttribute.cs
- AsymmetricKeyExchangeFormatter.cs
- RepeaterItemEventArgs.cs
- ValueExpressions.cs
- StyleSheet.cs
- EndpointDispatcherTable.cs
- EpmContentSerializer.cs
- OutOfMemoryException.cs
- EncoderParameters.cs
- WebPartCatalogCloseVerb.cs
- Italic.cs
- WaitForChangedResult.cs
- SettingsPropertyWrongTypeException.cs
- XmlMapping.cs
- SessionParameter.cs
- SaveFileDialog.cs
- SimplePropertyEntry.cs
- TemplateBindingExpression.cs
- ObjectViewEntityCollectionData.cs
- SystemPens.cs
- BinHexEncoder.cs
- RemotingServices.cs
- TypedElement.cs
- AddInToken.cs
- PrintPreviewControl.cs
- KnownBoxes.cs
- BindStream.cs
- KeyGesture.cs
- LocalBuilder.cs
- StateWorkerRequest.cs
- ClosureBinding.cs
- BrushConverter.cs
- XmlWriterTraceListener.cs
- WebUtil.cs
- AppSettingsExpressionBuilder.cs
- ImageListStreamer.cs
- RenderDataDrawingContext.cs
- DataGridAddNewRow.cs
- ListViewEditEventArgs.cs
- assertwrapper.cs
- InternalPermissions.cs
- RawContentTypeMapper.cs
- MultilineStringConverter.cs
- CacheModeValueSerializer.cs
- SqlProcedureAttribute.cs
- BindableAttribute.cs
- Stroke.cs
- SqlBooleanMismatchVisitor.cs
- SystemColorTracker.cs
- WebMessageEncodingBindingElement.cs
- DataRowCollection.cs
- InternalMappingException.cs
- SqlCacheDependencyDatabase.cs
- RelationshipDetailsRow.cs
- FullTextState.cs
- EntityDataSourceContextCreatedEventArgs.cs
- UiaCoreTypesApi.cs
- DelegatingTypeDescriptionProvider.cs
- StringAnimationBase.cs
- CodeTypeDelegate.cs
- GeometryModel3D.cs
- VisemeEventArgs.cs
- transactioncontext.cs
- SystemIPInterfaceStatistics.cs
- DispatcherHookEventArgs.cs
- MSAAWinEventWrap.cs
- TabletDeviceInfo.cs
- TabRenderer.cs
- DesignTimeVisibleAttribute.cs
- SafeLocalMemHandle.cs
- HtmlInputHidden.cs
- EventToken.cs
- counter.cs
- SkewTransform.cs
- StringComparer.cs
- TreeViewImageKeyConverter.cs
- RegexCompilationInfo.cs
- PreProcessInputEventArgs.cs
- DataGridViewComboBoxCell.cs
- prefixendpointaddressmessagefilter.cs
- HMACSHA384.cs
- DebugView.cs
- WinCategoryAttribute.cs
- NullReferenceException.cs
- _NestedSingleAsyncResult.cs
- PathTooLongException.cs
- MachineKeyConverter.cs
- MethodToken.cs
- BoolExpression.cs
- MenuItem.cs
- SchemaCompiler.cs
- ConfigurationLockCollection.cs