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
- UriExt.cs
- XappLauncher.cs
- LocalizableResourceBuilder.cs
- validationstate.cs
- LinearGradientBrush.cs
- DataBinder.cs
- GACMembershipCondition.cs
- Dictionary.cs
- SafeCertificateStore.cs
- Model3DGroup.cs
- ReadOnlyDataSource.cs
- DataTableCollection.cs
- SyndicationSerializer.cs
- JournalEntryListConverter.cs
- safex509handles.cs
- RectangleConverter.cs
- DbProviderConfigurationHandler.cs
- CellConstantDomain.cs
- StylusButton.cs
- MemberInfoSerializationHolder.cs
- DBDataPermission.cs
- WebPartEditorCancelVerb.cs
- SqlDependencyListener.cs
- WebPartUserCapability.cs
- WindowsSolidBrush.cs
- ColumnWidthChangedEvent.cs
- rsa.cs
- ScriptServiceAttribute.cs
- EnvelopedSignatureTransform.cs
- ChangePassword.cs
- AttributeUsageAttribute.cs
- FaultCallbackWrapper.cs
- StorageMappingItemLoader.cs
- RootBuilder.cs
- Validator.cs
- RichTextBoxDesigner.cs
- EnterpriseServicesHelper.cs
- DefaultTraceListener.cs
- UnicodeEncoding.cs
- ImportOptions.cs
- DriveNotFoundException.cs
- ProcessHost.cs
- MethodExpression.cs
- BStrWrapper.cs
- ContentValidator.cs
- XmlDomTextWriter.cs
- WebPartDescriptionCollection.cs
- PropertyValueUIItem.cs
- PointLightBase.cs
- DelayedRegex.cs
- QueueProcessor.cs
- DES.cs
- Label.cs
- WhitespaceRuleLookup.cs
- EncoderExceptionFallback.cs
- CrossAppDomainChannel.cs
- ArrayConverter.cs
- ZipArchive.cs
- UseManagedPresentationBindingElementImporter.cs
- XmlAttribute.cs
- FixedSOMGroup.cs
- OleDbCommand.cs
- TextBoxRenderer.cs
- InstanceValue.cs
- MdiWindowListStrip.cs
- WebBrowserNavigatingEventHandler.cs
- ScriptReference.cs
- DrawListViewItemEventArgs.cs
- SerializableTypeCodeDomSerializer.cs
- ListSourceHelper.cs
- Base64Encoding.cs
- RoleService.cs
- ContainerCodeDomSerializer.cs
- FormsAuthenticationUser.cs
- ExceptionValidationRule.cs
- IteratorFilter.cs
- Figure.cs
- ComUdtElement.cs
- HttpInputStream.cs
- UrlRoutingModule.cs
- ModelItemKeyValuePair.cs
- ElapsedEventArgs.cs
- XmlWriter.cs
- CallbackHandler.cs
- ImageMetadata.cs
- ISFTagAndGuidCache.cs
- ScriptComponentDescriptor.cs
- XmlArrayItemAttributes.cs
- ResourceReader.cs
- Collection.cs
- _OverlappedAsyncResult.cs
- GlyphInfoList.cs
- SatelliteContractVersionAttribute.cs
- coordinatorscratchpad.cs
- OptimalTextSource.cs
- EmptyQuery.cs
- ReferencedAssembly.cs
- Exceptions.cs
- _HelperAsyncResults.cs
- EnterpriseServicesHelper.cs