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
- ProgressBarAutomationPeer.cs
- EarlyBoundInfo.cs
- SqlGatherConsumedAliases.cs
- WindowsFormsLinkLabel.cs
- InputScopeNameConverter.cs
- ContextQuery.cs
- SystemBrushes.cs
- ProjectionCamera.cs
- SmtpTransport.cs
- MetabaseSettings.cs
- DataTable.cs
- InputReferenceExpression.cs
- StorageMappingItemLoader.cs
- AttributeQuery.cs
- NetworkInterface.cs
- TextFormatterContext.cs
- CurrentChangingEventArgs.cs
- ArgumentException.cs
- WS2007FederationHttpBindingCollectionElement.cs
- FullTextLine.cs
- TextEndOfSegment.cs
- TargetConverter.cs
- RowVisual.cs
- SmiEventStream.cs
- XPathSelfQuery.cs
- ScalarType.cs
- SynchronizedRandom.cs
- DataGridViewButtonColumn.cs
- SrgsElementList.cs
- WsatConfiguration.cs
- RemotingSurrogateSelector.cs
- RootProfilePropertySettingsCollection.cs
- ConstructorArgumentAttribute.cs
- InputScopeNameConverter.cs
- MetadataProperty.cs
- WindowsListView.cs
- panel.cs
- DocumentPageHost.cs
- ApplicationException.cs
- ConnectionConsumerAttribute.cs
- SoapInteropTypes.cs
- XMLUtil.cs
- VarInfo.cs
- EntityTransaction.cs
- FastEncoderWindow.cs
- PathFigureCollectionConverter.cs
- CheckBox.cs
- ObjectFullSpanRewriter.cs
- AssemblyBuilder.cs
- UTF32Encoding.cs
- RegexFCD.cs
- LinkedList.cs
- BitmapCacheBrush.cs
- SafeFileMappingHandle.cs
- AssertHelper.cs
- NotEqual.cs
- FixedSOMGroup.cs
- PropertyNames.cs
- CustomBindingCollectionElement.cs
- UInt64Converter.cs
- FeatureSupport.cs
- DataServiceRequestArgs.cs
- TranslateTransform.cs
- ArgIterator.cs
- BuildProviderAppliesToAttribute.cs
- DataGridColumn.cs
- AutoGeneratedFieldProperties.cs
- Compilation.cs
- SapiAttributeParser.cs
- SqlClientPermission.cs
- SessionIDManager.cs
- DependencyPropertyAttribute.cs
- RepeaterItemEventArgs.cs
- DiscreteKeyFrames.cs
- MouseGestureValueSerializer.cs
- ColorTransformHelper.cs
- SpecialNameAttribute.cs
- UIElement3D.cs
- WrapPanel.cs
- ClientSettingsSection.cs
- CommandValueSerializer.cs
- FlagsAttribute.cs
- XmlSchemaDocumentation.cs
- FunctionParameter.cs
- SortedList.cs
- BitmapEffectrendercontext.cs
- HttpContextWrapper.cs
- ThreadExceptionEvent.cs
- ToolStripDropTargetManager.cs
- Logging.cs
- HtmlInputFile.cs
- DateTimeConstantAttribute.cs
- ValueProviderWrapper.cs
- DataGridBoolColumn.cs
- MsmqHostedTransportManager.cs
- TableRow.cs
- ChangePassword.cs
- BufferCache.cs
- WmlListAdapter.cs
- WebPartTransformerCollection.cs