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
- Int32RectConverter.cs
- ReflectionPermission.cs
- OdbcConnection.cs
- HasCopySemanticsAttribute.cs
- UIElement3DAutomationPeer.cs
- ModuleBuilderData.cs
- TextServicesHost.cs
- StringBuilder.cs
- AnnotationResourceCollection.cs
- FixUp.cs
- ComponentChangingEvent.cs
- TextElementEnumerator.cs
- IPAddressCollection.cs
- StorageEntityTypeMapping.cs
- PatternMatcher.cs
- PropertyFilterAttribute.cs
- SymLanguageVendor.cs
- PermissionSetTriple.cs
- Selector.cs
- UnsafePeerToPeerMethods.cs
- FieldToken.cs
- TextEffect.cs
- WebPartCloseVerb.cs
- WebPartZoneCollection.cs
- AccessKeyManager.cs
- SqlCommandBuilder.cs
- TimeEnumHelper.cs
- DesignUtil.cs
- PageCatalogPart.cs
- StylusPointPropertyInfo.cs
- ControlCachePolicy.cs
- WindowsFormsHelpers.cs
- Rect3DValueSerializer.cs
- BitmapEffect.cs
- AnnotationService.cs
- InputScopeAttribute.cs
- EncoderBestFitFallback.cs
- validation.cs
- PersonalizationProviderCollection.cs
- XmlTextEncoder.cs
- DeadLetterQueue.cs
- EtwTrace.cs
- SocketException.cs
- Encoding.cs
- StyleReferenceConverter.cs
- VersionPair.cs
- DataSourceControlBuilder.cs
- CollectionChangedEventManager.cs
- PageSetupDialog.cs
- Stopwatch.cs
- ValueExpressions.cs
- CryptoKeySecurity.cs
- PagesChangedEventArgs.cs
- MouseOverProperty.cs
- Parameter.cs
- XmlnsDictionary.cs
- ReadOnlyTernaryTree.cs
- RecordsAffectedEventArgs.cs
- ZeroOpNode.cs
- Pkcs9Attribute.cs
- SimpleType.cs
- SmiConnection.cs
- DrawingGroup.cs
- SimpleRecyclingCache.cs
- PackagePartCollection.cs
- TableRow.cs
- RegexWorker.cs
- WebBrowserSiteBase.cs
- BulletedListEventArgs.cs
- WbmpConverter.cs
- CodeDirectionExpression.cs
- DataSourceControlBuilder.cs
- ColorConverter.cs
- ScriptResourceHandler.cs
- UnsafeNativeMethods.cs
- ListDictionary.cs
- EditCommandColumn.cs
- CodeIdentifiers.cs
- WebServiceMethodData.cs
- ScrollBarAutomationPeer.cs
- sapiproxy.cs
- TrustManagerPromptUI.cs
- SoapIgnoreAttribute.cs
- Block.cs
- EncryptedKeyHashIdentifierClause.cs
- SystemIPAddressInformation.cs
- XmlSchemaAppInfo.cs
- SerializationAttributes.cs
- HostElement.cs
- PartialCachingAttribute.cs
- DataBindEngine.cs
- XmlSchemaAny.cs
- RequestStatusBarUpdateEventArgs.cs
- CodeChecksumPragma.cs
- Pool.cs
- FlagsAttribute.cs
- TakeOrSkipQueryOperator.cs
- HistoryEventArgs.cs
- Compensate.cs
- XDeferredAxisSource.cs