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
- FormViewDeletedEventArgs.cs
- MonikerBuilder.cs
- StylusPoint.cs
- ElementNotAvailableException.cs
- ArrangedElementCollection.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- BaseHashHelper.cs
- CompiledQueryCacheKey.cs
- EntityCollectionChangedParams.cs
- TypeHelper.cs
- MenuItemCollection.cs
- ReadOnlyTernaryTree.cs
- HttpMethodAttribute.cs
- TextWriter.cs
- WebServiceTypeData.cs
- TypeSchema.cs
- PageThemeCodeDomTreeGenerator.cs
- RoleManagerSection.cs
- LogRecordSequence.cs
- DesignerCategoryAttribute.cs
- ParsedAttributeCollection.cs
- SafeViewOfFileHandle.cs
- JsonStringDataContract.cs
- IndependentAnimationStorage.cs
- MultipleViewPattern.cs
- MappableObjectManager.cs
- EmptyControlCollection.cs
- PieceDirectory.cs
- CharacterBuffer.cs
- SspiNegotiationTokenProviderState.cs
- ColumnMapCopier.cs
- TypeSemantics.cs
- DeviceSpecific.cs
- SecurityPermission.cs
- ImageAnimator.cs
- CutCopyPasteHelper.cs
- EditorZoneBase.cs
- StringUtil.cs
- EdmItemCollection.OcAssemblyCache.cs
- JsonClassDataContract.cs
- XhtmlBasicLiteralTextAdapter.cs
- LiteralTextParser.cs
- SafeProcessHandle.cs
- SoapReflector.cs
- RoutedEventConverter.cs
- TagMapCollection.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- SystemBrushes.cs
- SchemaType.cs
- BitmapImage.cs
- wgx_exports.cs
- cookieexception.cs
- XmlCharCheckingWriter.cs
- ComponentDispatcher.cs
- PersonalizationStateQuery.cs
- MemoryMappedFileSecurity.cs
- RelatedCurrencyManager.cs
- SimpleMailWebEventProvider.cs
- ScaleTransform.cs
- NotSupportedException.cs
- StatusBarItem.cs
- Debug.cs
- IPPacketInformation.cs
- ArraySubsetEnumerator.cs
- InvalidOleVariantTypeException.cs
- FormsAuthenticationCredentials.cs
- ModuleBuilder.cs
- DataBindingHandlerAttribute.cs
- ValidationUtility.cs
- TreeView.cs
- SQLResource.cs
- BrowserCapabilitiesCompiler.cs
- Pair.cs
- WebPartZone.cs
- TemplatedControlDesigner.cs
- XmlDataContract.cs
- DropDownButton.cs
- DataBindingHandlerAttribute.cs
- EncodingFallbackAwareXmlTextWriter.cs
- ArgIterator.cs
- XmlSerializerOperationGenerator.cs
- DeclarativeCatalogPart.cs
- PrintController.cs
- ServiceEndpointElement.cs
- DataServiceClientException.cs
- MachineKeyConverter.cs
- JournalEntry.cs
- AppSettingsExpressionBuilder.cs
- SymmetricAlgorithm.cs
- ManagementScope.cs
- HMACRIPEMD160.cs
- LogRestartAreaEnumerator.cs
- StringSorter.cs
- ErrorsHelper.cs
- TextRangeEdit.cs
- CommandDesigner.cs
- CrossContextChannel.cs
- DiffuseMaterial.cs
- Visual3D.cs
- ReflectionPermission.cs