Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / DisplayClaim.cs / 1 / DisplayClaim.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.Collections.Generic; using System.IO; // // This class represents a single claim in the display token // class DisplayClaim { string m_name; Listm_value; string m_description; string m_uri; public string Name { get { return m_name; } set { m_name = value; } } public string Id { get { return m_uri; } } public DisplayClaim( BinaryReader reader ) { Deserialize( reader ); } // // Summary // CTOR // // Parameters // name - Display name of the claim // value - value of the claim // description - description of the claims // uri - claim uri // public DisplayClaim( string name, List value, string description, string uri ) { m_name = name; m_value = value; m_description = description; m_uri = uri; } // // Summary // Serialize the display claim // // Parameter // The writer to which the serialized data is written. // public void Serialize( BinaryWriter writer ) { Utility.SerializeString( writer, m_name ); writer.Write( ( UInt32 )m_value.Count ); foreach( string val in m_value ) { Utility.SerializeString( writer, val ); } Utility.SerializeString( writer, m_description ); Utility.SerializeString( writer, m_uri ); } // // Summary // Deserialize the display claim // // Parameter // The reader from which the serialized data is read. // public void Deserialize( BinaryReader reader ) { m_name = Utility.DeserializeString( reader ); UInt32 count = reader.ReadUInt32(); for( UInt32 i = 0; i < count; i++ ) { m_value.Add( Utility.DeserializeString( reader ) ); } m_description = Utility.DeserializeString( reader ); m_uri = Utility.DeserializeString( reader ); } } } // 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
- WebPermission.cs
- GestureRecognizer.cs
- DesignerOptionService.cs
- RemoteWebConfigurationHostServer.cs
- ReadOnlyHierarchicalDataSource.cs
- DrawToolTipEventArgs.cs
- DoubleAnimationClockResource.cs
- SchemaCollectionCompiler.cs
- TransformerInfo.cs
- TextContainerHelper.cs
- DoubleStorage.cs
- StateRuntime.cs
- TabOrder.cs
- OracleParameterCollection.cs
- TextServicesPropertyRanges.cs
- SchemaContext.cs
- WindowsFont.cs
- HtmlElementErrorEventArgs.cs
- NamespaceMapping.cs
- RequestStatusBarUpdateEventArgs.cs
- CheckBoxBaseAdapter.cs
- PackWebResponse.cs
- RowToParametersTransformer.cs
- DocumentPage.cs
- SoapAttributes.cs
- XmlReflectionMember.cs
- FieldMetadata.cs
- SerializationUtility.cs
- PathGeometry.cs
- TextDecorations.cs
- NamespaceEmitter.cs
- Int32Animation.cs
- TemplateControlParser.cs
- IsolatedStorageFile.cs
- ShowExpandedMultiValueConverter.cs
- SortedSetDebugView.cs
- TraceListener.cs
- BooleanSwitch.cs
- DynamicActionMessageFilter.cs
- BlockUIContainer.cs
- CombinedGeometry.cs
- ServiceRoute.cs
- SendingRequestEventArgs.cs
- RunClient.cs
- EncoderReplacementFallback.cs
- PerfCounterSection.cs
- XmlSchemaValidationException.cs
- IDispatchConstantAttribute.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- GregorianCalendar.cs
- MimeParameterWriter.cs
- ProjectionCamera.cs
- DeclaredTypeElementCollection.cs
- SchemaNotation.cs
- RuntimeConfigLKG.cs
- CrossAppDomainChannel.cs
- AsyncCompletedEventArgs.cs
- CfgParser.cs
- ReadOnlyMetadataCollection.cs
- RegexGroup.cs
- D3DImage.cs
- ExpressionEditorAttribute.cs
- Int16Converter.cs
- ExpressionContext.cs
- AnnotationDocumentPaginator.cs
- Brush.cs
- InitializerFacet.cs
- SignedXml.cs
- TextStore.cs
- COM2IDispatchConverter.cs
- SoapRpcMethodAttribute.cs
- Base64Encoding.cs
- XamlToRtfWriter.cs
- PnrpPermission.cs
- AncillaryOps.cs
- PropertyInformationCollection.cs
- EventLogStatus.cs
- FormClosingEvent.cs
- EntityDataSourceViewSchema.cs
- AndAlso.cs
- HScrollProperties.cs
- IsolatedStorageException.cs
- HostProtectionPermission.cs
- DesignBindingConverter.cs
- ToolBarPanel.cs
- Ports.cs
- TreeViewImageIndexConverter.cs
- ChannelPoolSettings.cs
- NetPipeSectionData.cs
- DependencySource.cs
- SmtpMail.cs
- ConstrainedDataObject.cs
- XPathExpr.cs
- DataRowView.cs
- HttpStreamXmlDictionaryReader.cs
- SafeRightsManagementPubHandle.cs
- PrivilegedConfigurationManager.cs
- XPathNavigatorReader.cs
- ContextBase.cs
- ScriptManagerProxy.cs