Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media / Animation / TimeEnumHelper.cs / 1 / TimeEnumHelper.cs
//------------------------------------------------------------------------------ // Microsoft Windows Client Platform // Copyright (c) Microsoft Corporation, 2004 // // File: TimeEnumHelper.cs //----------------------------------------------------------------------------- using System; using System.Windows.Media.Animation; namespace MS.Internal { ////// A class for validating enumerated types. /// internal static partial class TimeEnumHelper { // IMPORTANT: These values must be kept current with enum definitions for validation to work // Enums declared in Enums.cs private const int _maxTimeSeekOrigin = (int)TimeSeekOrigin.Duration; // Enums declared in PathAnimationSource.cs private const byte _maxPathAnimationSource = (int)PathAnimationSource.Angle; ////// Determines if the enumerated value is defined (valid) for the given enumerated type /// /// /// The variable whose validity is verified. /// ////// True if valid, false otherwise. /// static internal bool IsValidTimeSeekOrigin(TimeSeekOrigin value) { return (0 <= value && (int)value <= _maxTimeSeekOrigin); } ////// Determines if the enumerated value is defined (valid) for the given enumerated type /// /// /// The variable whose validity is verified. /// ////// True if valid, false otherwise. /// static internal bool IsValidPathAnimationSource(PathAnimationSource value) { return (0 <= value && (byte)value <= _maxPathAnimationSource); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ // Microsoft Windows Client Platform // Copyright (c) Microsoft Corporation, 2004 // // File: TimeEnumHelper.cs //----------------------------------------------------------------------------- using System; using System.Windows.Media.Animation; namespace MS.Internal { ////// A class for validating enumerated types. /// internal static partial class TimeEnumHelper { // IMPORTANT: These values must be kept current with enum definitions for validation to work // Enums declared in Enums.cs private const int _maxTimeSeekOrigin = (int)TimeSeekOrigin.Duration; // Enums declared in PathAnimationSource.cs private const byte _maxPathAnimationSource = (int)PathAnimationSource.Angle; ////// Determines if the enumerated value is defined (valid) for the given enumerated type /// /// /// The variable whose validity is verified. /// ////// True if valid, false otherwise. /// static internal bool IsValidTimeSeekOrigin(TimeSeekOrigin value) { return (0 <= value && (int)value <= _maxTimeSeekOrigin); } ////// Determines if the enumerated value is defined (valid) for the given enumerated type /// /// /// The variable whose validity is verified. /// ////// True if valid, false otherwise. /// static internal bool IsValidPathAnimationSource(PathAnimationSource value) { return (0 <= value && (byte)value <= _maxPathAnimationSource); } } } // 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
- XmlException.cs
- StyleSheetComponentEditor.cs
- ViewGenResults.cs
- PixelFormatConverter.cs
- MimePart.cs
- cache.cs
- ContractsBCL.cs
- Panel.cs
- CngKey.cs
- BitStack.cs
- SymbolResolver.cs
- configsystem.cs
- SqlMetaData.cs
- TimeSpanMinutesConverter.cs
- GenericRootAutomationPeer.cs
- ProtectedProviderSettings.cs
- HttpRawResponse.cs
- XpsS0ValidatingLoader.cs
- EndPoint.cs
- NativeObjectSecurity.cs
- HuffCodec.cs
- precedingquery.cs
- TreeViewItem.cs
- MessageVersion.cs
- DefaultBindingPropertyAttribute.cs
- DataGridDetailsPresenter.cs
- TagMapInfo.cs
- DataSourceCollectionBase.cs
- ObjectCloneHelper.cs
- DefaultCommandConverter.cs
- Odbc32.cs
- InstalledVoice.cs
- SingleResultAttribute.cs
- HttpHandlerActionCollection.cs
- ContextMarshalException.cs
- StyleXamlParser.cs
- PropertyManager.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- Boolean.cs
- DispatcherOperation.cs
- SafeFileMappingHandle.cs
- XLinq.cs
- IIS7WorkerRequest.cs
- KeyToListMap.cs
- SessionEndedEventArgs.cs
- SecurityElement.cs
- XmlNodeList.cs
- WindowsToolbarAsMenu.cs
- TableItemPattern.cs
- LocatorManager.cs
- ConfigurationUtility.cs
- PrintPreviewGraphics.cs
- ByteAnimation.cs
- DrawTreeNodeEventArgs.cs
- KeyInfo.cs
- AmbientLight.cs
- AVElementHelper.cs
- ControlParameter.cs
- ToolboxDataAttribute.cs
- DependentList.cs
- ExpressionPrinter.cs
- ConnectionInterfaceCollection.cs
- SerTrace.cs
- ToolStripItemImageRenderEventArgs.cs
- MsmqHostedTransportManager.cs
- GridViewDeleteEventArgs.cs
- HtmlForm.cs
- LayoutEngine.cs
- ServerIdentity.cs
- ExtendedTransformFactory.cs
- PersonalizationAdministration.cs
- SvcFileManager.cs
- BaseTreeIterator.cs
- SplitterEvent.cs
- AllMembershipCondition.cs
- BulletChrome.cs
- HelpKeywordAttribute.cs
- HostedTcpTransportManager.cs
- Compiler.cs
- IndexerNameAttribute.cs
- PropertyToken.cs
- Int32Collection.cs
- XmlAttributeCollection.cs
- SerializationAttributes.cs
- IgnoreSection.cs
- ResourceBinder.cs
- MergeFailedEvent.cs
- SubpageParagraph.cs
- FixedTextContainer.cs
- InputLanguage.cs
- ToolStripOverflow.cs
- ColumnResult.cs
- SqlError.cs
- WebServiceEnumData.cs
- SelectionListComponentEditor.cs
- MessageSecurityOverMsmqElement.cs
- WebPartConnectionCollection.cs
- ResourceType.cs
- regiisutil.cs
- OleTxTransaction.cs