Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- KeyValueSerializer.cs
- EncodingFallbackAwareXmlTextWriter.cs
- DataGridTemplateColumn.cs
- ListViewItem.cs
- DownloadProgressEventArgs.cs
- SqlEnums.cs
- ToggleButton.cs
- DateTime.cs
- TypeUnloadedException.cs
- DynamicILGenerator.cs
- ipaddressinformationcollection.cs
- TypeSemantics.cs
- SecureEnvironment.cs
- TextRangeSerialization.cs
- UnmanagedMarshal.cs
- HttpListenerException.cs
- FontInfo.cs
- TextElement.cs
- ServerValidateEventArgs.cs
- DataBinder.cs
- Quaternion.cs
- KeyProperty.cs
- StructuredCompositeActivityDesigner.cs
- StructureChangedEventArgs.cs
- NullableDoubleSumAggregationOperator.cs
- DesignDataSource.cs
- WinFormsSpinner.cs
- ConditionedDesigner.cs
- ButtonBaseAutomationPeer.cs
- ZoomPercentageConverter.cs
- TableCellCollection.cs
- HtmlHistory.cs
- InOutArgumentConverter.cs
- ArraySet.cs
- EditorZone.cs
- UInt64Converter.cs
- RegexCharClass.cs
- EdmTypeAttribute.cs
- DateTime.cs
- EnumType.cs
- TraceHandler.cs
- DocumentViewerBaseAutomationPeer.cs
- AppDomain.cs
- BufferedWebEventProvider.cs
- XmlValidatingReader.cs
- FontWeights.cs
- HMACMD5.cs
- Point3D.cs
- InheritedPropertyDescriptor.cs
- CodeTypeReference.cs
- FixedSOMTableCell.cs
- HostUtils.cs
- WebPermission.cs
- BamlVersionHeader.cs
- XmlBufferedByteStreamReader.cs
- basenumberconverter.cs
- DataListCommandEventArgs.cs
- ThreadSafeList.cs
- NavigationWindow.cs
- RectangleF.cs
- DesigntimeLicenseContext.cs
- ReadWriteSpinLock.cs
- ScriptDescriptor.cs
- EFDataModelProvider.cs
- GridSplitter.cs
- HtmlInputCheckBox.cs
- EncryptedXml.cs
- GAC.cs
- PackWebRequest.cs
- ProgressBar.cs
- PropVariant.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- DetailsViewUpdateEventArgs.cs
- MetadataArtifactLoaderResource.cs
- MetadataArtifactLoaderResource.cs
- EmbeddedMailObject.cs
- InstanceKeyCollisionException.cs
- ProgressBarAutomationPeer.cs
- DBCommand.cs
- SourceChangedEventArgs.cs
- AssemblyBuilderData.cs
- TargetControlTypeCache.cs
- DataRecordObjectView.cs
- DataGridViewControlCollection.cs
- UIElementIsland.cs
- EnumMember.cs
- Variable.cs
- HtmlGenericControl.cs
- MethodCallConverter.cs
- ImageAnimator.cs
- HashRepartitionStream.cs
- XmlNamespaceMapping.cs
- KeyboardDevice.cs
- BuildManagerHost.cs
- WebPartVerb.cs
- HttpCachePolicy.cs
- ServiceObjectContainer.cs
- Axis.cs
- BamlLocalizationDictionary.cs
- PreservationFileReader.cs