Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ExpandedWrapper.cs
- SqlXml.cs
- ListViewItem.cs
- ScrollBarAutomationPeer.cs
- RenderData.cs
- OSEnvironmentHelper.cs
- SafeEventLogWriteHandle.cs
- OdbcError.cs
- TagPrefixAttribute.cs
- TdsParserSessionPool.cs
- CollectionViewGroupInternal.cs
- HMACSHA384.cs
- SoapHeader.cs
- DataGridViewImageCell.cs
- TextEndOfParagraph.cs
- CryptoConfig.cs
- DesignerVerbCollection.cs
- ToolStripLocationCancelEventArgs.cs
- XmlValueConverter.cs
- DefaultAssemblyResolver.cs
- UIPropertyMetadata.cs
- ParseElement.cs
- BitmapEffectInputData.cs
- SqlLiftIndependentRowExpressions.cs
- SqlCacheDependencyDatabase.cs
- PointLight.cs
- RefreshEventArgs.cs
- ResourceDisplayNameAttribute.cs
- ProcessModule.cs
- XmlDataCollection.cs
- DefinitionBase.cs
- ParserContext.cs
- StorageRoot.cs
- SafeBitVector32.cs
- UpdateCommand.cs
- StylusCaptureWithinProperty.cs
- DirectoryNotFoundException.cs
- FormsAuthenticationConfiguration.cs
- TargetFrameworkUtil.cs
- PathFigure.cs
- Vector3DCollection.cs
- ApplicationProxyInternal.cs
- EventHandlerList.cs
- DataBoundControl.cs
- SmtpAuthenticationManager.cs
- ChannelManagerService.cs
- ObjectSecurity.cs
- TypeSemantics.cs
- InternalResources.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- GeneralTransformGroup.cs
- JsonWriterDelegator.cs
- Content.cs
- UserNameSecurityToken.cs
- PropertyStore.cs
- DataFormats.cs
- httpapplicationstate.cs
- _LocalDataStore.cs
- UidManager.cs
- IdentityHolder.cs
- SqlClientMetaDataCollectionNames.cs
- WebContext.cs
- SimpleApplicationHost.cs
- StylusPointProperties.cs
- GridViewDesigner.cs
- COSERVERINFO.cs
- SimpleTextLine.cs
- BadImageFormatException.cs
- ConversionContext.cs
- LongPath.cs
- ResourceProviderFactory.cs
- PropertyPathConverter.cs
- MouseDevice.cs
- MimeMapping.cs
- PageThemeBuildProvider.cs
- CellParaClient.cs
- TableLayoutSettings.cs
- XmlDomTextWriter.cs
- MenuAdapter.cs
- SecurityContext.cs
- ClientScriptManagerWrapper.cs
- BindingNavigator.cs
- MenuCommand.cs
- Compiler.cs
- StandardOleMarshalObject.cs
- AdornedElementPlaceholder.cs
- ProxyHwnd.cs
- RSAPKCS1SignatureDeformatter.cs
- HttpValueCollection.cs
- TableRowCollection.cs
- IDReferencePropertyAttribute.cs
- PlatformNotSupportedException.cs
- RectangleHotSpot.cs
- CodeCommentStatement.cs
- UpdatePanelTrigger.cs
- SelectingProviderEventArgs.cs
- ConnectionPointCookie.cs
- Size3D.cs
- ServiceDescriptionContext.cs
- EventLogPermissionEntryCollection.cs