Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- Utils.cs
- SystemThemeKey.cs
- Identity.cs
- RSAPKCS1SignatureDeformatter.cs
- Line.cs
- Pair.cs
- IIS7UserPrincipal.cs
- SoapAttributeOverrides.cs
- Events.cs
- StrokeNodeOperations2.cs
- ImageFormat.cs
- FacetDescription.cs
- ErrorFormatterPage.cs
- TimerEventSubscription.cs
- ContextMenuStripGroup.cs
- Geometry3D.cs
- PolyBezierSegmentFigureLogic.cs
- DataSourceSerializationException.cs
- ObjectKeyFrameCollection.cs
- EntitySet.cs
- BulletDecorator.cs
- MobileComponentEditorPage.cs
- Calendar.cs
- Inline.cs
- DataColumnPropertyDescriptor.cs
- IndexingContentUnit.cs
- Run.cs
- VisualStates.cs
- SectionXmlInfo.cs
- IsolatedStoragePermission.cs
- ImageMapEventArgs.cs
- PackWebRequest.cs
- CaseInsensitiveOrdinalStringComparer.cs
- QilGenerator.cs
- DataComponentGenerator.cs
- Storyboard.cs
- OperationResponse.cs
- TreeView.cs
- Section.cs
- TableAutomationPeer.cs
- ThreadExceptionDialog.cs
- TraceListener.cs
- EditorBrowsableAttribute.cs
- PtsContext.cs
- ImageList.cs
- UnmanagedBitmapWrapper.cs
- HttpFormatExtensions.cs
- TagPrefixAttribute.cs
- ProcessThreadCollection.cs
- _Win32.cs
- ProcessRequestAsyncResult.cs
- X509CertificateValidator.cs
- HashMembershipCondition.cs
- XmlElementAttributes.cs
- HitTestParameters.cs
- SwitchAttribute.cs
- Cursor.cs
- MembershipUser.cs
- SettingsAttributeDictionary.cs
- ReferencedCategoriesDocument.cs
- GetPageCompletedEventArgs.cs
- OdbcPermission.cs
- Highlights.cs
- CommandLibraryHelper.cs
- SQLMembershipProvider.cs
- TextServicesLoader.cs
- WebControlsSection.cs
- XmlNamespaceManager.cs
- GridViewUpdatedEventArgs.cs
- X509SubjectKeyIdentifierClause.cs
- securitymgrsite.cs
- ModelService.cs
- ActivityDesignerResources.cs
- CustomErrorCollection.cs
- EventProxy.cs
- MimeObjectFactory.cs
- TypeToTreeConverter.cs
- DefaultDiscoveryService.cs
- ManagedFilter.cs
- Aggregates.cs
- _UriSyntax.cs
- SoapSchemaExporter.cs
- TypeConverter.cs
- ConstructorNeedsTagAttribute.cs
- X509CertificateInitiatorClientCredential.cs
- MessageQueue.cs
- TypeResolver.cs
- StandardCommandToolStripMenuItem.cs
- DockAndAnchorLayout.cs
- X509Logo.cs
- ProviderCollection.cs
- Overlapped.cs
- BaseConfigurationRecord.cs
- HighContrastHelper.cs
- MsmqIntegrationElement.cs
- wgx_exports.cs
- DataKeyArray.cs
- ChannelServices.cs
- ListItemConverter.cs
- XmlValueConverter.cs