Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / System / IO / Packaging / PackagePartCollection.cs / 1305600 / 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
- VirtualizedItemPattern.cs
- InfoCardArgumentException.cs
- CodeDirectionExpression.cs
- RegexGroup.cs
- WebHttpElement.cs
- SecureStringHasher.cs
- ColorConvertedBitmap.cs
- MenuItemBinding.cs
- MbpInfo.cs
- TextTreeTextNode.cs
- ComponentGlyph.cs
- InheritedPropertyChangedEventArgs.cs
- EncoderFallback.cs
- UnsettableComboBox.cs
- InvokeProviderWrapper.cs
- MessageHeaderDescriptionCollection.cs
- ListControlBuilder.cs
- DesignerCategoryAttribute.cs
- HttpCapabilitiesBase.cs
- MostlySingletonList.cs
- AnnotationStore.cs
- GridProviderWrapper.cs
- HybridWebProxyFinder.cs
- userdatakeys.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- ParagraphVisual.cs
- BreakRecordTable.cs
- HttpException.cs
- DataGridPageChangedEventArgs.cs
- DatatypeImplementation.cs
- SqlFacetAttribute.cs
- OracleParameter.cs
- SqlXml.cs
- TableCellCollection.cs
- XmlSchemaDatatype.cs
- ComponentConverter.cs
- ArraySegment.cs
- AuthenticationModuleElement.cs
- RepeaterDesigner.cs
- MessageContractExporter.cs
- SamlDoNotCacheCondition.cs
- ProcessModule.cs
- PartitionedStream.cs
- ActivityDesigner.cs
- CodeLinePragma.cs
- DragCompletedEventArgs.cs
- PrimitiveCodeDomSerializer.cs
- MarkupCompiler.cs
- LicenseException.cs
- Odbc32.cs
- CodeStatement.cs
- Rect3DConverter.cs
- IncomingWebRequestContext.cs
- TimeZoneInfo.cs
- GridItemPatternIdentifiers.cs
- DatatypeImplementation.cs
- SQLBoolean.cs
- DefaultBinder.cs
- ParserContext.cs
- ComMethodElement.cs
- HorizontalAlignConverter.cs
- AssemblyAttributesGoHere.cs
- SafeBitVector32.cs
- NonSerializedAttribute.cs
- ResolveCriteria.cs
- BufferAllocator.cs
- ApplicationDirectoryMembershipCondition.cs
- AsyncStreamReader.cs
- Oid.cs
- IsolatedStorageFilePermission.cs
- SimpleType.cs
- Assert.cs
- TimelineGroup.cs
- XmlSchemaException.cs
- PolicyReader.cs
- DoubleLinkListEnumerator.cs
- SqlXmlStorage.cs
- DESCryptoServiceProvider.cs
- SessionParameter.cs
- XmlParserContext.cs
- ExceptionUtil.cs
- SolidColorBrush.cs
- AudioBase.cs
- Rect3D.cs
- odbcmetadatacollectionnames.cs
- DataGridViewRowStateChangedEventArgs.cs
- NumberFormatInfo.cs
- OracleSqlParser.cs
- InputScopeConverter.cs
- ElementNotEnabledException.cs
- FormsAuthenticationModule.cs
- PtsContext.cs
- ServiceHostFactory.cs
- Point.cs
- CodeArgumentReferenceExpression.cs
- SqlDataSourceView.cs
- UInt64.cs
- ScopelessEnumAttribute.cs
- AuthorizationPolicyTypeElementCollection.cs
- PolicyException.cs