Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Base / System / IO / Packaging / PackagePartCollection.cs / 1 / PackagePartCollection.cs
//------------------------------------------------------------------------------ // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // This is a base abstract class for PackagePartCollection. This is a part of the // MMCF Packaging Layer // // History: // 01/03/2004: SarjanaS: Initial creation. [Stubs only] // 03/01/2004: SarjanaS: Implemented the functionality for all the members. //----------------------------------------------------------------------------- // Allow use of presharp warning numbers [6506] unknown to the compiler #pragma warning disable 1634, 1691 using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; namespace System.IO.Packaging { ////// This class is used to get an enumerator for the Parts in a container. /// This is a part of the Packaging Layer APIs /// public class PackagePartCollection : IEnumerable{ //----------------------------------------------------- // // Public Constructors // //----------------------------------------------------- // None //------------------------------------------------------ // // Public Properties // //----------------------------------------------------- // None //------------------------------------------------------ // // Public Methods // //------------------------------------------------------ #region Public Methods /// /// Returns an enumerator over all the Parts in the container /// ///IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } /// /// Returns an enumerator over all the Parts in the container /// ///IEnumerator IEnumerable .GetEnumerator() { return GetEnumerator(); } /// /// Returns an enumerator over all the Parts in the Container /// ///public IEnumerator GetEnumerator() { //PRESHARP:Warning 6506 Parameter to this public method must be validated: A null-dereference can occur here. //The Dictionary.Values property always returns a collection, even if empty. It never returns a null. #pragma warning disable 6506 return _partList.Values.GetEnumerator(); #pragma warning restore 6506 } #endregion Public Methods //----------------------------------------------------- // // Public Events // //------------------------------------------------------ // None //----------------------------------------------------- // // Internal Constructors // //----------------------------------------------------- #region Internal Constructor internal PackagePartCollection(SortedList partList) { Debug.Assert(partList != null, "partDictionary parameter cannot be null"); _partList = partList; } #endregion Internal Constructor //----------------------------------------------------- // // Internal Properties // //------------------------------------------------------ // None //----------------------------------------------------- // // Internal Methods // //------------------------------------------------------ // None //------------------------------------------------------ // // Internal Events // //----------------------------------------------------- // None //------------------------------------------------------ // // Private Methods // //----------------------------------------------------- // None //----------------------------------------------------- // // Private Fields // //----------------------------------------------------- #region Private Members private SortedList _partList; #endregion Private Members } } // 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. // // // Description: // This is a base abstract class for PackagePartCollection. This is a part of the // MMCF Packaging Layer // // History: // 01/03/2004: SarjanaS: Initial creation. [Stubs only] // 03/01/2004: SarjanaS: Implemented the functionality for all the members. //----------------------------------------------------------------------------- // Allow use of presharp warning numbers [6506] unknown to the compiler #pragma warning disable 1634, 1691 using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; namespace System.IO.Packaging { ////// This class is used to get an enumerator for the Parts in a container. /// This is a part of the Packaging Layer APIs /// public class PackagePartCollection : IEnumerable{ //----------------------------------------------------- // // Public Constructors // //----------------------------------------------------- // None //------------------------------------------------------ // // Public Properties // //----------------------------------------------------- // None //------------------------------------------------------ // // Public Methods // //------------------------------------------------------ #region Public Methods /// /// Returns an enumerator over all the Parts in the container /// ///IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } /// /// Returns an enumerator over all the Parts in the container /// ///IEnumerator IEnumerable .GetEnumerator() { return GetEnumerator(); } /// /// Returns an enumerator over all the Parts in the Container /// ///public IEnumerator GetEnumerator() { //PRESHARP:Warning 6506 Parameter to this public method must be validated: A null-dereference can occur here. //The Dictionary.Values property always returns a collection, even if empty. It never returns a null. #pragma warning disable 6506 return _partList.Values.GetEnumerator(); #pragma warning restore 6506 } #endregion Public Methods //----------------------------------------------------- // // Public Events // //------------------------------------------------------ // None //----------------------------------------------------- // // Internal Constructors // //----------------------------------------------------- #region Internal Constructor internal PackagePartCollection(SortedList partList) { Debug.Assert(partList != null, "partDictionary parameter cannot be null"); _partList = partList; } #endregion Internal Constructor //----------------------------------------------------- // // Internal Properties // //------------------------------------------------------ // None //----------------------------------------------------- // // Internal Methods // //------------------------------------------------------ // None //------------------------------------------------------ // // Internal Events // //----------------------------------------------------- // None //------------------------------------------------------ // // Private Methods // //----------------------------------------------------- // None //----------------------------------------------------- // // Private Fields // //----------------------------------------------------- #region Private Members private SortedList _partList; #endregion Private Members } } // 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
- ToolStripDropDownClosedEventArgs.cs
- RoutedUICommand.cs
- MailWebEventProvider.cs
- DoubleLink.cs
- SignatureToken.cs
- SurrogateEncoder.cs
- WebPartsPersonalization.cs
- RepeatEnumerable.cs
- SiteMapPath.cs
- ToolStripItemRenderEventArgs.cs
- VirtualizingPanel.cs
- SwitchAttribute.cs
- PagePropertiesChangingEventArgs.cs
- MailDefinition.cs
- LogReservationCollection.cs
- SqlCacheDependency.cs
- SoapEnumAttribute.cs
- AsyncOperation.cs
- DataComponentGenerator.cs
- StorageEntityContainerMapping.cs
- SqlBinder.cs
- MDIClient.cs
- Trace.cs
- ObjectTypeMapping.cs
- ManualResetEvent.cs
- TextEndOfParagraph.cs
- DoubleLinkList.cs
- XmlSchemaProviderAttribute.cs
- HtmlTitle.cs
- XamlFilter.cs
- CodeDirectoryCompiler.cs
- ApplyImportsAction.cs
- KerberosRequestorSecurityToken.cs
- ProviderException.cs
- HtmlShim.cs
- MessageBox.cs
- AnnotationDocumentPaginator.cs
- WebPartEventArgs.cs
- ZoneMembershipCondition.cs
- ExpressionVisitor.cs
- HashJoinQueryOperatorEnumerator.cs
- SchemaAttDef.cs
- DataListItemEventArgs.cs
- RadioButton.cs
- WsdlBuildProvider.cs
- ParameterCollection.cs
- KnownTypesProvider.cs
- WebEncodingValidatorAttribute.cs
- PublisherMembershipCondition.cs
- ManagementScope.cs
- SendMailErrorEventArgs.cs
- TreeViewCancelEvent.cs
- UnsafeNetInfoNativeMethods.cs
- BindingManagerDataErrorEventArgs.cs
- Scripts.cs
- FrameworkElement.cs
- SplineKeyFrames.cs
- FileReader.cs
- XmlSchemaType.cs
- Random.cs
- UnitySerializationHolder.cs
- TextDocumentView.cs
- AllMembershipCondition.cs
- CompositeControl.cs
- WindowsAuthenticationEventArgs.cs
- mediaeventshelper.cs
- PropertyOrder.cs
- CharEntityEncoderFallback.cs
- ElementProxy.cs
- CodeValidator.cs
- RowsCopiedEventArgs.cs
- RankException.cs
- CollectionContainer.cs
- NavigationCommands.cs
- SessionStateModule.cs
- PrintControllerWithStatusDialog.cs
- XmlSchemaObjectCollection.cs
- SQLSingleStorage.cs
- ContentPropertyAttribute.cs
- NumberFormatter.cs
- PngBitmapEncoder.cs
- WebPartDisplayModeCollection.cs
- Rect3DConverter.cs
- HtmlProps.cs
- HeaderedContentControl.cs
- JournalNavigationScope.cs
- RadioButton.cs
- AuthenticationConfig.cs
- BuildDependencySet.cs
- DataGridBoolColumn.cs
- DateTimeFormatInfoScanner.cs
- TypeUtil.cs
- HttpModulesSection.cs
- GetUserPreferenceRequest.cs
- ListenerTraceUtility.cs
- ReadOnlyNameValueCollection.cs
- UInt32Storage.cs
- WebPartConnectionsConnectVerb.cs
- ImportException.cs
- WindowsButton.cs