Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / SetterBase.cs / 1305600 / SetterBase.cs
/****************************************************************************\
*
* File: SetterBase.cs
*
* TargetType property and event setting base class.
*
* Copyright (C) 2004 by Microsoft Corporation. All rights reserved.
*
\***************************************************************************/
namespace System.Windows
{
///
/// TargetType property and event setting base class.
///
[Localizability(LocalizationCategory.Ignore)]
public abstract class SetterBase
{
///
/// SetterBase construction
///
internal SetterBase()
{
}
///
/// Returns the sealed state of this object. If true, any attempt
/// at modifying the state of this object will trigger an exception.
///
public bool IsSealed
{
get
{
return _sealed;
}
}
internal virtual void Seal()
{
_sealed = true;
}
///
/// Subclasses need to call this method before any changes to their state.
///
protected void CheckSealed()
{
if ( _sealed )
{
throw new InvalidOperationException(SR.Get(SRID.CannotChangeAfterSealed, "SetterBase"));
}
}
// Derived
private bool _sealed;
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
/****************************************************************************\
*
* File: SetterBase.cs
*
* TargetType property and event setting base class.
*
* Copyright (C) 2004 by Microsoft Corporation. All rights reserved.
*
\***************************************************************************/
namespace System.Windows
{
///
/// TargetType property and event setting base class.
///
[Localizability(LocalizationCategory.Ignore)]
public abstract class SetterBase
{
///
/// SetterBase construction
///
internal SetterBase()
{
}
///
/// Returns the sealed state of this object. If true, any attempt
/// at modifying the state of this object will trigger an exception.
///
public bool IsSealed
{
get
{
return _sealed;
}
}
internal virtual void Seal()
{
_sealed = true;
}
///
/// Subclasses need to call this method before any changes to their state.
///
protected void CheckSealed()
{
if ( _sealed )
{
throw new InvalidOperationException(SR.Get(SRID.CannotChangeAfterSealed, "SetterBase"));
}
}
// Derived
private bool _sealed;
}
}
// 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
- TimelineClockCollection.cs
- WsdlWriter.cs
- CodeTypeParameter.cs
- TableLayoutPanelBehavior.cs
- ExpressionBuilder.cs
- LinqMaximalSubtreeNominator.cs
- LeaseManager.cs
- LogicalExpr.cs
- TextRunCache.cs
- PersonalizationProvider.cs
- SafeRightsManagementPubHandle.cs
- RijndaelManaged.cs
- TrustManagerMoreInformation.cs
- DuplexChannel.cs
- Visual3D.cs
- DetailsViewDeleteEventArgs.cs
- BCryptNative.cs
- WindowsSecurityToken.cs
- XamlParser.cs
- NumericUpDownAcceleration.cs
- PathFigureCollectionValueSerializer.cs
- DataList.cs
- Focus.cs
- NotCondition.cs
- SchemaUtility.cs
- JoinElimination.cs
- FileSystemInfo.cs
- MultiTouchSystemGestureLogic.cs
- EventLogWatcher.cs
- GridViewColumnHeader.cs
- PrintControllerWithStatusDialog.cs
- BatchStream.cs
- ProtocolElementCollection.cs
- WhitespaceRuleReader.cs
- WebPartTransformer.cs
- ValidationResult.cs
- OptimizerPatterns.cs
- FamilyTypeface.cs
- DbConnectionOptions.cs
- ObjectListComponentEditor.cs
- DecoderExceptionFallback.cs
- TreeNode.cs
- Util.cs
- PersonalizationProviderHelper.cs
- InstanceDescriptor.cs
- PropertyPath.cs
- WindowsAltTab.cs
- CqlGenerator.cs
- ProcessModule.cs
- ToolStripDropDownClosingEventArgs.cs
- Image.cs
- UIPropertyMetadata.cs
- BoundColumn.cs
- MarkupCompilePass1.cs
- FileDialog_Vista_Interop.cs
- BufferedOutputStream.cs
- dbenumerator.cs
- LinqToSqlWrapper.cs
- SendActivityEventArgs.cs
- ToolStripDropDownClosedEventArgs.cs
- ImageField.cs
- WCFServiceClientProxyGenerator.cs
- SchemaAttDef.cs
- ProtocolElementCollection.cs
- ConnectionProviderAttribute.cs
- TypeElementCollection.cs
- DataBinder.cs
- SimpleWebHandlerParser.cs
- FilterRepeater.cs
- FilterableAttribute.cs
- DataServices.cs
- GeometryHitTestResult.cs
- OleDbPermission.cs
- MD5Cng.cs
- DependencyObjectCodeDomSerializer.cs
- ReferenceEqualityComparer.cs
- LinqDataSourceSelectEventArgs.cs
- CompilerHelpers.cs
- TextOutput.cs
- FontFamilyConverter.cs
- ConfigurationLockCollection.cs
- XPathException.cs
- Roles.cs
- Translator.cs
- NoneExcludedImageIndexConverter.cs
- UserUseLicenseDictionaryLoader.cs
- TextTreeRootTextBlock.cs
- ReflectionPermission.cs
- ChannelRequirements.cs
- CompositeDataBoundControl.cs
- _HelperAsyncResults.cs
- FunctionOverloadResolver.cs
- CollectionsUtil.cs
- XmlTypeMapping.cs
- DataObjectSettingDataEventArgs.cs
- XmlnsCache.cs
- SByteConverter.cs
- TextAction.cs
- PrintPreviewDialog.cs
- DecoderExceptionFallback.cs