Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Diagnostics / CollectionTraceRecord.cs / 1 / CollectionTraceRecord.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Diagnostics { using System; using System.Collections; using System.Diagnostics; using System.Globalization; using System.Xml; using System.Xml.Serialization; class CollectionTraceRecord : TraceRecord { IEnumerable entries; string collectionName; string elementName; public CollectionTraceRecord(string collectionName, string elementName, IEnumerable entries) { this.collectionName = String.IsNullOrEmpty(collectionName) ? "Elements" : collectionName; this.elementName = String.IsNullOrEmpty(elementName) ? "Element" : elementName; this.entries = entries; } internal override string EventId { get { return TraceRecord.EventIdBase + "Collection" + TraceRecord.NamespaceSuffix; } } internal override void WriteTo(XmlWriter xml) { if (this.entries != null) { xml.WriteStartElement(this.collectionName); foreach (object element in this.entries) { xml.WriteElementString(this.elementName, element == null ? "null" : element.ToString()); } xml.WriteEndElement(); } } } } // 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
- ListParagraph.cs
- HtmlInputText.cs
- Form.cs
- EmbeddedMailObjectCollectionEditor.cs
- SecurityTokenValidationException.cs
- WebPartDisplayMode.cs
- SemaphoreSecurity.cs
- QuotedStringFormatReader.cs
- PropertyGridEditorPart.cs
- BamlReader.cs
- _LoggingObject.cs
- IndentTextWriter.cs
- PtsContext.cs
- FusionWrap.cs
- FrameworkElement.cs
- XamlTreeBuilderBamlRecordWriter.cs
- ResourcePool.cs
- XmlSchemaComplexContent.cs
- DataControlFieldCell.cs
- ToolStripSeparatorRenderEventArgs.cs
- CodeTypeOfExpression.cs
- XmlSchemaSimpleType.cs
- ChildChangedEventArgs.cs
- RtfToXamlReader.cs
- QueryRewriter.cs
- ErrorWrapper.cs
- ToolTipService.cs
- XmlElementCollection.cs
- RadioButtonBaseAdapter.cs
- PropertyFilter.cs
- AnnotationService.cs
- ListBox.cs
- TypeElementCollection.cs
- PathFigureCollection.cs
- DbTypeMap.cs
- WindowsUpDown.cs
- BeginStoryboard.cs
- Calendar.cs
- DelegateSerializationHolder.cs
- WebMessageFormatHelper.cs
- Message.cs
- BaseProcessor.cs
- CacheEntry.cs
- MarkupObject.cs
- CompilerGeneratedAttribute.cs
- Privilege.cs
- ServiceModelSectionGroup.cs
- WebPartEventArgs.cs
- FragmentQueryProcessor.cs
- DataControlField.cs
- CorrelationManager.cs
- ConfigDefinitionUpdates.cs
- DbInsertCommandTree.cs
- RemotingException.cs
- SqlComparer.cs
- RoleManagerSection.cs
- CryptographicAttribute.cs
- MetadataHelper.cs
- SolidColorBrush.cs
- NamedPermissionSet.cs
- CommonDialog.cs
- ConnectionString.cs
- FormsIdentity.cs
- TableMethodGenerator.cs
- ProfileGroupSettingsCollection.cs
- EmptyStringExpandableObjectConverter.cs
- UserNamePasswordValidationMode.cs
- XmlFormatWriterGenerator.cs
- BitmapCodecInfoInternal.cs
- KeyGesture.cs
- FileDialog_Vista.cs
- ClientConfigurationSystem.cs
- Lease.cs
- ObjectConverter.cs
- ActivityDelegate.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- Wizard.cs
- ConfigurationHandlersInstallComponent.cs
- ClientTargetSection.cs
- MetaModel.cs
- KerberosSecurityTokenAuthenticator.cs
- DtrList.cs
- GeometryDrawing.cs
- RestrictedTransactionalPackage.cs
- UriWriter.cs
- XPathNavigator.cs
- DateTimeOffsetConverter.cs
- RightsManagementInformation.cs
- CodeNamespaceCollection.cs
- SqlDependencyUtils.cs
- sqlpipe.cs
- PassportAuthenticationModule.cs
- TextPatternIdentifiers.cs
- MemoryMappedViewStream.cs
- SupportingTokenListenerFactory.cs
- DocumentAutomationPeer.cs
- TraceSection.cs
- TransportSecurityProtocolFactory.cs
- LayoutEvent.cs
- DataGridRowAutomationPeer.cs