Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media / PathSegmentCollection.cs / 1 / PathSegmentCollection.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // //--------------------------------------------------------------------------- using MS.Internal; using MS.Internal.PresentationCore; using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.InteropServices; using System.ComponentModel.Design.Serialization; using System.Text; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using System.Windows.Markup; namespace System.Windows.Media { ////// The class definition for PathSegmentCollection /// [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] public sealed partial class PathSegmentCollection : Animatable, IList, IList{ /// /// Can serialze "this" to a string. /// This is true iff every segment is stroked. /// internal bool CanSerializeToString() { bool canSerialize = true; for (int i=0; i<_collection.Count; i++) { if (!_collection[i].IsStroked) { canSerialize = false; break; } } return canSerialize; } ////// Creates a string representation of this object based on the format string /// and IFormatProvider passed in. /// If the provider is null, the CurrentCulture is used. /// See the documentation for IFormattable for more information. /// ////// A string representation of this object. /// internal string ConvertToString(string format, IFormatProvider provider) { if (_collection.Count == 0) { return String.Empty; } StringBuilder str = new StringBuilder(); char separator = MS.Internal.TokenizerHelper.GetNumericListSeparator(provider); for (int i=0; i<_collection.Count; i++) { str.Append(_collection[i].ConvertToString(format, provider)); } return str.ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // //--------------------------------------------------------------------------- using MS.Internal; using MS.Internal.PresentationCore; using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.InteropServices; using System.ComponentModel.Design.Serialization; using System.Text; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using System.Windows.Markup; namespace System.Windows.Media { ////// The class definition for PathSegmentCollection /// [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] public sealed partial class PathSegmentCollection : Animatable, IList, IList{ /// /// Can serialze "this" to a string. /// This is true iff every segment is stroked. /// internal bool CanSerializeToString() { bool canSerialize = true; for (int i=0; i<_collection.Count; i++) { if (!_collection[i].IsStroked) { canSerialize = false; break; } } return canSerialize; } ////// Creates a string representation of this object based on the format string /// and IFormatProvider passed in. /// If the provider is null, the CurrentCulture is used. /// See the documentation for IFormattable for more information. /// ////// A string representation of this object. /// internal string ConvertToString(string format, IFormatProvider provider) { if (_collection.Count == 0) { return String.Empty; } StringBuilder str = new StringBuilder(); char separator = MS.Internal.TokenizerHelper.GetNumericListSeparator(provider); for (int i=0; i<_collection.Count; i++) { str.Append(_collection[i].ConvertToString(format, provider)); } return str.ToString(); } } } // 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
- CommandPlan.cs
- GACMembershipCondition.cs
- HostedBindingBehavior.cs
- X509CertificateCollection.cs
- _FtpDataStream.cs
- RoleGroupCollection.cs
- DataServiceOperationContext.cs
- TagPrefixInfo.cs
- BaseContextMenu.cs
- WpfKnownTypeInvoker.cs
- contentDescriptor.cs
- DataControlImageButton.cs
- XmlSchemaDocumentation.cs
- MruCache.cs
- TextBox.cs
- _SSPISessionCache.cs
- QueryResult.cs
- EventToken.cs
- AnimationClock.cs
- EtwTrace.cs
- ProgramPublisher.cs
- ProfileModule.cs
- TemplateComponentConnector.cs
- RadioButtonStandardAdapter.cs
- MultiSelectRootGridEntry.cs
- SpeakInfo.cs
- EdmValidator.cs
- PropertyTabAttribute.cs
- GcHandle.cs
- PropertyChangingEventArgs.cs
- ToolboxItemAttribute.cs
- OrderByQueryOptionExpression.cs
- Tile.cs
- LocatorPart.cs
- SqlProfileProvider.cs
- WindowsFormsHost.cs
- DataGridViewColumnCollection.cs
- StreamedWorkflowDefinitionContext.cs
- UnSafeCharBuffer.cs
- WindowsSysHeader.cs
- PersonalizationProvider.cs
- DrawingBrush.cs
- TransactionChannelFaultConverter.cs
- CommandBinding.cs
- ProfileBuildProvider.cs
- DataViewListener.cs
- SupportingTokenSecurityTokenResolver.cs
- TableDetailsCollection.cs
- SizeConverter.cs
- ToolStripAdornerWindowService.cs
- FileEnumerator.cs
- dataSvcMapFileLoader.cs
- HtmlToClrEventProxy.cs
- CodeStatementCollection.cs
- XhtmlBasicTextViewAdapter.cs
- ZipIOLocalFileBlock.cs
- TemplateControl.cs
- DataListComponentEditor.cs
- WebBrowserUriTypeConverter.cs
- FieldMetadata.cs
- PolicyManager.cs
- MarginsConverter.cs
- WebPartManager.cs
- XMLSchema.cs
- FileDialog.cs
- UnSafeCharBuffer.cs
- XmlSchema.cs
- SystemIPAddressInformation.cs
- ScrollChrome.cs
- EmptyStringExpandableObjectConverter.cs
- HyperLink.cs
- RootNamespaceAttribute.cs
- InheritedPropertyChangedEventArgs.cs
- ProtocolsConfigurationHandler.cs
- ToolTipService.cs
- ReflectionTypeLoadException.cs
- SearchForVirtualItemEventArgs.cs
- SecuritySessionClientSettings.cs
- HtmlGenericControl.cs
- DoubleAnimationUsingPath.cs
- SettingsPropertyCollection.cs
- SafeCryptoHandles.cs
- HtmlListAdapter.cs
- BaseTreeIterator.cs
- CssTextWriter.cs
- Delegate.cs
- DocumentPageHost.cs
- WindowsListViewScroll.cs
- CollectionExtensions.cs
- SafeThemeHandle.cs
- ThreadPool.cs
- SecurityBindingElement.cs
- CodeDefaultValueExpression.cs
- SourceItem.cs
- LambdaCompiler.Unary.cs
- CommandConverter.cs
- Oid.cs
- COM2ColorConverter.cs
- StatusBarItemAutomationPeer.cs
- SystemIPGlobalProperties.cs