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
- ServiceX509SecurityTokenProvider.cs
- MD5HashHelper.cs
- MediaElementAutomationPeer.cs
- ComAdminInterfaces.cs
- KeysConverter.cs
- AttributeCollection.cs
- RootBuilder.cs
- mediaeventshelper.cs
- DBConcurrencyException.cs
- NamedPipeDuplicateContext.cs
- RSAProtectedConfigurationProvider.cs
- StrokeCollection2.cs
- COM2ExtendedTypeConverter.cs
- AndAlso.cs
- ExpressionEditor.cs
- CursorConverter.cs
- DependencyPropertyKind.cs
- SoapConverter.cs
- GlyphCache.cs
- X509Utils.cs
- XmlnsDictionary.cs
- isolationinterop.cs
- Renderer.cs
- ZipIOBlockManager.cs
- CollectionViewProxy.cs
- MatchAttribute.cs
- Figure.cs
- ResourceIDHelper.cs
- LongCountAggregationOperator.cs
- CodeIdentifiers.cs
- CommandID.cs
- HGlobalSafeHandle.cs
- ContextStack.cs
- XslAst.cs
- TextPatternIdentifiers.cs
- HierarchicalDataTemplate.cs
- PagedDataSource.cs
- ScaleTransform.cs
- XmlTextAttribute.cs
- TranslateTransform.cs
- LineGeometry.cs
- WsatServiceCertificate.cs
- SoapAttributeOverrides.cs
- DynamicControlParameter.cs
- GPRECT.cs
- StoreContentChangedEventArgs.cs
- Models.cs
- ImplicitInputBrush.cs
- Point.cs
- TextDpi.cs
- AppDomain.cs
- BinHexDecoder.cs
- PathSegmentCollection.cs
- TypeConverterAttribute.cs
- XmlWriterDelegator.cs
- TextProperties.cs
- CodeSnippetExpression.cs
- DoubleCollection.cs
- ApplicationInterop.cs
- SetUserPreferenceRequest.cs
- WebPartRestoreVerb.cs
- DateTimeOffsetAdapter.cs
- DataStorage.cs
- LogicalExpressionTypeConverter.cs
- CultureInfo.cs
- Transform3D.cs
- ExtendedProperty.cs
- PathFigureCollection.cs
- StorageMappingItemCollection.cs
- InstanceHandleConflictException.cs
- ImageSourceConverter.cs
- ExpressionEditorAttribute.cs
- _UriTypeConverter.cs
- PolyBezierSegment.cs
- GenericsInstances.cs
- PackageRelationshipSelector.cs
- MetabaseServerConfig.cs
- View.cs
- WorkflowServiceHost.cs
- TableRowCollection.cs
- JoinQueryOperator.cs
- BitmapEffect.cs
- XMLUtil.cs
- PolyLineSegment.cs
- PeerConnector.cs
- ObjectQueryState.cs
- ProfileModule.cs
- DateTimeUtil.cs
- SourceChangedEventArgs.cs
- AuthenticateEventArgs.cs
- DetailsViewRowCollection.cs
- MailAddressCollection.cs
- Floater.cs
- MainMenu.cs
- TextSelection.cs
- XmlCharCheckingWriter.cs
- AccessDataSourceView.cs
- SpeechDetectedEventArgs.cs
- GenericTypeParameterBuilder.cs
- SqlBuffer.cs