Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / InfocardExtendedInformationEntry.cs / 1 / InfocardExtendedInformationEntry.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace Microsoft.InfoCards
{
using System;
using System.Xml;
using System.Collections.Generic;
using System.Collections;
using System.Xml.Serialization;
using System.Xml.Schema;
using System.IO;
using System.Text;
using Microsoft.InfoCards.Diagnostics;
using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace;
//
// Summary
// An entry representing additional information contained in the card as part of xs:any
//
internal class InfocardExtendedInformationEntry : IXmlSerializable
{
string m_xmlElement;
//
// Summary
// Serialize the InfocardExtendedInformationEntry object
//
// Parameter
// writer - binary stream conforming to the serialization format supported by this class.
//
public void Serialize( System.IO.BinaryWriter writer )
{
Utility.SerializeString( writer, m_xmlElement );
}
//
// Summary
// Deserialize the InfocardExtendedInformationEntry object
//
// Parameter
// reader - binary stream conforming to the serialization format supported by this class.
//
public void Deserialize( System.IO.BinaryReader reader )
{
m_xmlElement = Utility.DeserializeString( reader );
}
//
// Summary
// Return the xml.
//
public string GetXml()
{
return m_xmlElement;
}
public XmlSchema GetSchema()
{
return null;
}
//
// Summary
// Write the InfocardExtendedInformation to xml.
//
// Parameters
// writer - The XmlWriter to write the data to
//
public void WriteXml( XmlWriter writer )
{
if( null == writer )
{
throw IDT.ThrowHelperArgumentNull( "writer" );
}
XmlReader reader = InfoCardSchemas.CreateReader( m_xmlElement );
writer.WriteNode( reader, false );
}
//
// Summary
// Read the ExtendedInformationEntry from the xml. In future this function will read all
// the elements which are a part of the crd file ( as the xs:any elements )
// For now, only the IssuerInformation element is being read.
//
// Parameters
// reader - The XmlReader to read data from
//
public void ReadXml( XmlReader reader )
{
if( !reader.IsStartElement() )
{
throw IDT.ThrowHelperError( new InvalidCardException( SR.GetString( SR.UnexpectedElement ) ) );
}
XmlReader subtreeReader = reader.ReadSubtree();
subtreeReader.Read();
m_xmlElement = subtreeReader.ReadOuterXml();
subtreeReader.Close();
}
}
}
// 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
- ByteArrayHelperWithString.cs
- NamedPermissionSet.cs
- ControlPersister.cs
- HtmlAnchor.cs
- Condition.cs
- LogStore.cs
- entitydatasourceentitysetnameconverter.cs
- ServicesUtilities.cs
- AppDomainFactory.cs
- RectangleHotSpot.cs
- ToolCreatedEventArgs.cs
- ZipIOLocalFileBlock.cs
- CodeExporter.cs
- RegisterInfo.cs
- WebHttpSecurity.cs
- X509Extension.cs
- SerializableTypeCodeDomSerializer.cs
- Win32KeyboardDevice.cs
- SynchronizedInputProviderWrapper.cs
- UnionCodeGroup.cs
- CustomValidator.cs
- OletxTransactionFormatter.cs
- UnsignedPublishLicense.cs
- FixedDocumentSequencePaginator.cs
- Model3D.cs
- AnonymousIdentificationSection.cs
- HttpModuleCollection.cs
- UDPClient.cs
- DLinqColumnProvider.cs
- DesignerForm.cs
- DataGridViewCellStyle.cs
- GridViewColumnHeader.cs
- SchemaImporterExtensionElementCollection.cs
- HebrewNumber.cs
- NonSerializedAttribute.cs
- Screen.cs
- TimelineGroup.cs
- StylusEventArgs.cs
- OracleConnectionFactory.cs
- ListBindingConverter.cs
- ButtonRenderer.cs
- HostVisual.cs
- BodyGlyph.cs
- VisualTreeUtils.cs
- Attributes.cs
- BooleanStorage.cs
- StorageAssociationTypeMapping.cs
- DataObjectSettingDataEventArgs.cs
- ProfileGroupSettingsCollection.cs
- SyndicationSerializer.cs
- WebPartTransformer.cs
- BamlRecordReader.cs
- TabletDevice.cs
- ImageClickEventArgs.cs
- HGlobalSafeHandle.cs
- TextTreeTextNode.cs
- DataGridViewTopRowAccessibleObject.cs
- EditorPartChrome.cs
- KnowledgeBase.cs
- CacheSection.cs
- Process.cs
- CommentEmitter.cs
- Setter.cs
- AddDataControlFieldDialog.cs
- ProgressBarAutomationPeer.cs
- Marshal.cs
- MultidimensionalArrayItemReference.cs
- ListGeneralPage.cs
- DesignBindingConverter.cs
- RectValueSerializer.cs
- AsymmetricKeyExchangeDeformatter.cs
- EdmRelationshipRoleAttribute.cs
- PathTooLongException.cs
- Win32.cs
- TableLayoutStyleCollection.cs
- MulticastIPAddressInformationCollection.cs
- SHA1CryptoServiceProvider.cs
- CellCreator.cs
- FormsAuthenticationEventArgs.cs
- RequestCacheManager.cs
- HttpWrapper.cs
- SqlConnection.cs
- NullableIntSumAggregationOperator.cs
- SchemaNamespaceManager.cs
- TypeConverterAttribute.cs
- DbException.cs
- ListBoxChrome.cs
- PassportIdentity.cs
- Label.cs
- XmlBinaryReader.cs
- SQLMoney.cs
- WasHttpHandlersInstallComponent.cs
- TreeNodeSelectionProcessor.cs
- InputLanguageProfileNotifySink.cs
- Animatable.cs
- XmlHierarchicalDataSourceView.cs
- COM2EnumConverter.cs
- Track.cs
- SymbolUsageManager.cs
- UxThemeWrapper.cs