Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Media / Imaging / BitmapInitialize.cs / 1 / BitmapInitialize.cs
//------------------------------------------------------------------------------ // Microsoft Avalon // Copyright (c) Microsoft Corporation. All Rights Reserved. // // File: BitmapInitialize.cs // //----------------------------------------------------------------------------- using System; using System.IO; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Reflection; using MS.Internal; using MS.Win32; using System.Security; using System.Security.Permissions; using System.Diagnostics; using System.Windows.Media; using System.Globalization; using System.Runtime.InteropServices; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { #region BitmapInitialize ////// Utility class providing support for ISupportInitialize /// internal class BitmapInitialize : ISupportInitialize { public BitmapInitialize() { } public void BeginInit() { if (IsInitAtLeastOnce) throw new InvalidOperationException(SR.Get(SRID.Image_OnlyOneInit, null)); if (IsInInit) throw new InvalidOperationException(SR.Get(SRID.Image_InInitialize, null)); _inInit = true; } public void EndInit() { if (!IsInInit) throw new InvalidOperationException(SR.Get(SRID.Image_EndInitWithoutBeginInit, null)); _inInit = false; _isInitialized = true; } public void SetPrologue() { if (!IsInInit) { throw new InvalidOperationException(SR.Get(SRID.Image_SetPropertyOutsideBeginEndInit, null)); } } public bool IsInInit { get { return _inInit; } } public bool IsInitAtLeastOnce { get { return _isInitialized; } } public void EnsureInitializedComplete() { if (IsInInit) throw new InvalidOperationException(SR.Get(SRID.Image_InitializationIncomplete, null)); if (!IsInitAtLeastOnce) throw new InvalidOperationException(SR.Get(SRID.Image_NotInitialized, null)); } public void Reset() { _inInit = false; _isInitialized = false; } private bool _inInit = false; private bool _isInitialized = false; } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // Microsoft Avalon // Copyright (c) Microsoft Corporation. All Rights Reserved. // // File: BitmapInitialize.cs // //----------------------------------------------------------------------------- using System; using System.IO; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Reflection; using MS.Internal; using MS.Win32; using System.Security; using System.Security.Permissions; using System.Diagnostics; using System.Windows.Media; using System.Globalization; using System.Runtime.InteropServices; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { #region BitmapInitialize ////// Utility class providing support for ISupportInitialize /// internal class BitmapInitialize : ISupportInitialize { public BitmapInitialize() { } public void BeginInit() { if (IsInitAtLeastOnce) throw new InvalidOperationException(SR.Get(SRID.Image_OnlyOneInit, null)); if (IsInInit) throw new InvalidOperationException(SR.Get(SRID.Image_InInitialize, null)); _inInit = true; } public void EndInit() { if (!IsInInit) throw new InvalidOperationException(SR.Get(SRID.Image_EndInitWithoutBeginInit, null)); _inInit = false; _isInitialized = true; } public void SetPrologue() { if (!IsInInit) { throw new InvalidOperationException(SR.Get(SRID.Image_SetPropertyOutsideBeginEndInit, null)); } } public bool IsInInit { get { return _inInit; } } public bool IsInitAtLeastOnce { get { return _isInitialized; } } public void EnsureInitializedComplete() { if (IsInInit) throw new InvalidOperationException(SR.Get(SRID.Image_InitializationIncomplete, null)); if (!IsInitAtLeastOnce) throw new InvalidOperationException(SR.Get(SRID.Image_NotInitialized, null)); } public void Reset() { _inInit = false; _isInitialized = false; } private bool _inInit = false; private bool _isInitialized = false; } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Ops.cs
- Constraint.cs
- UpdateEventArgs.cs
- SmtpReplyReader.cs
- Container.cs
- SqlCrossApplyToCrossJoin.cs
- CompilationSection.cs
- UnaryNode.cs
- OnOperation.cs
- ConvertersCollection.cs
- SrgsSemanticInterpretationTag.cs
- CustomValidator.cs
- EntityModelSchemaGenerator.cs
- MdiWindowListStrip.cs
- _BufferOffsetSize.cs
- SqlNode.cs
- TextRangeProviderWrapper.cs
- ActiveXSite.cs
- Visual3DCollection.cs
- ZipIOLocalFileHeader.cs
- ToolStripItem.cs
- PrePrepareMethodAttribute.cs
- RC2CryptoServiceProvider.cs
- GridItemPattern.cs
- URLMembershipCondition.cs
- ServiceDocumentFormatter.cs
- SafeThemeHandle.cs
- TdsParser.cs
- RoutingConfiguration.cs
- PropertyCollection.cs
- DeclaredTypeValidator.cs
- Size.cs
- LocatorPartList.cs
- NodeFunctions.cs
- CommandManager.cs
- XmlNodeReader.cs
- XmlDownloadManager.cs
- WebPartDisplayModeEventArgs.cs
- BrushConverter.cs
- ExtendedPropertyCollection.cs
- SchemaDeclBase.cs
- FrameworkElementFactoryMarkupObject.cs
- DataMisalignedException.cs
- AxisAngleRotation3D.cs
- PointLightBase.cs
- SimpleApplicationHost.cs
- OutOfProcStateClientManager.cs
- DisplayInformation.cs
- CodeParameterDeclarationExpressionCollection.cs
- ConfigurationErrorsException.cs
- RawUIStateInputReport.cs
- PeerNeighborManager.cs
- RTTypeWrapper.cs
- PointKeyFrameCollection.cs
- ToolStripDropDownClosedEventArgs.cs
- TdsParserSessionPool.cs
- ResourceManager.cs
- RegexCompiler.cs
- RegexMatchCollection.cs
- CodeNamespaceImportCollection.cs
- ToolStripRendererSwitcher.cs
- NumericExpr.cs
- RoleGroupCollection.cs
- XmlTextReaderImpl.cs
- TypeHelpers.cs
- CompilationUtil.cs
- TraceSource.cs
- CategoryAttribute.cs
- TreeNodeCollection.cs
- IndicShape.cs
- ViewService.cs
- BrowserCapabilitiesFactory.cs
- DbProviderConfigurationHandler.cs
- SelfSignedCertificate.cs
- ConnectionManagementElementCollection.cs
- TypeInfo.cs
- GridViewAutomationPeer.cs
- FlowchartSizeFeature.cs
- XmlSchemaObjectCollection.cs
- DataGridTableCollection.cs
- PtsHelper.cs
- ProgressBar.cs
- BoundPropertyEntry.cs
- ExplicitDiscriminatorMap.cs
- URIFormatException.cs
- FontNamesConverter.cs
- HitTestParameters3D.cs
- DecimalConverter.cs
- ButtonColumn.cs
- SynchronousChannelMergeEnumerator.cs
- LoginView.cs
- ToolStripRenderEventArgs.cs
- XmlDownloadManager.cs
- ContentElement.cs
- CompiledIdentityConstraint.cs
- CompModSwitches.cs
- messageonlyhwndwrapper.cs
- DockPattern.cs
- MimeParameters.cs
- GridViewSortEventArgs.cs