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
- RankException.cs
- MatrixTransform.cs
- ConfigXmlText.cs
- Int16Storage.cs
- RectValueSerializer.cs
- UniqueEventHelper.cs
- DataTransferEventArgs.cs
- HitTestWithPointDrawingContextWalker.cs
- Exceptions.cs
- ConfigXmlComment.cs
- NamespaceMapping.cs
- OleDbRowUpdatingEvent.cs
- EntityDataSourceConfigureObjectContextPanel.cs
- TimeoutConverter.cs
- TaskExceptionHolder.cs
- ResourceKey.cs
- IntAverageAggregationOperator.cs
- NetCodeGroup.cs
- xamlnodes.cs
- TextEmbeddedObject.cs
- StaticExtensionConverter.cs
- StoreItemCollection.Loader.cs
- ClientSideProviderDescription.cs
- AsyncContentLoadedEventArgs.cs
- ArglessEventHandlerProxy.cs
- HelloMessageCD1.cs
- ListContractAdapter.cs
- Converter.cs
- PrimitiveOperationFormatter.cs
- MissingMemberException.cs
- TextEditorTables.cs
- HttpChannelBindingToken.cs
- EditorAttributeInfo.cs
- ResourceContainer.cs
- IfJoinedCondition.cs
- Matrix3DStack.cs
- DrawingAttributes.cs
- DataGridViewCellStyle.cs
- ThemeDictionaryExtension.cs
- XPathNavigator.cs
- OdbcParameterCollection.cs
- IISUnsafeMethods.cs
- KeyTimeConverter.cs
- StopStoryboard.cs
- HandledMouseEvent.cs
- CreateRefExpr.cs
- FileLevelControlBuilderAttribute.cs
- SQLByte.cs
- DataKeyCollection.cs
- ProjectedSlot.cs
- BulletDecorator.cs
- ScrollViewerAutomationPeer.cs
- IFlowDocumentViewer.cs
- FileDialog.cs
- columnmapfactory.cs
- entityreference_tresulttype.cs
- SetMemberBinder.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- ReachVisualSerializer.cs
- QualificationDataItem.cs
- ImageSourceValueSerializer.cs
- XmlSchemaValidator.cs
- SqlDataSourceCache.cs
- ReachDocumentReferenceCollectionSerializer.cs
- SectionVisual.cs
- StylusLogic.cs
- BaseValidator.cs
- PolygonHotSpot.cs
- BehaviorService.cs
- Metafile.cs
- TypeGeneratedEventArgs.cs
- AnnotationHighlightLayer.cs
- SplayTreeNode.cs
- XmlUtil.cs
- DataObjectMethodAttribute.cs
- XhtmlBasicCalendarAdapter.cs
- UndoUnit.cs
- OrderedHashRepartitionEnumerator.cs
- PageTheme.cs
- SubclassTypeValidator.cs
- DataGridHeaderBorder.cs
- HwndSourceParameters.cs
- ExpressionLexer.cs
- ResourceProviderFactory.cs
- Hashtable.cs
- XmlAttribute.cs
- StandardToolWindows.cs
- DrawListViewItemEventArgs.cs
- HttpUnhandledOperationInvoker.cs
- CatalogPartChrome.cs
- ComponentCollection.cs
- DocumentViewer.cs
- TypeInfo.cs
- TemplateBamlRecordReader.cs
- DynamicDataManager.cs
- EventSetter.cs
- NetworkInterface.cs
- TreeNodeMouseHoverEvent.cs
- Crc32.cs
- SwitchElementsCollection.cs