Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ButtonRenderer.cs
- DbConnectionPoolGroup.cs
- SchemaObjectWriter.cs
- CngKeyCreationParameters.cs
- Pkcs7Recipient.cs
- FlowDocumentView.cs
- CustomErrorsSection.cs
- SafePointer.cs
- PropertyEmitter.cs
- ResXDataNode.cs
- QualificationDataAttribute.cs
- QilPatternFactory.cs
- Point4DConverter.cs
- XmlSchemaInferenceException.cs
- nulltextnavigator.cs
- MimeParameter.cs
- HitTestWithGeometryDrawingContextWalker.cs
- EntityDataReader.cs
- FillErrorEventArgs.cs
- SmtpNetworkElement.cs
- SettingsBindableAttribute.cs
- RecordsAffectedEventArgs.cs
- Style.cs
- EntityDataSource.cs
- WebControlsSection.cs
- StreamInfo.cs
- AbstractDataSvcMapFileLoader.cs
- AmbiguousMatchException.cs
- VariableQuery.cs
- GetFileNameResult.cs
- WsatAdminException.cs
- ProjectionPlan.cs
- OptimizerPatterns.cs
- ThaiBuddhistCalendar.cs
- Point4DValueSerializer.cs
- PagerSettings.cs
- TextBoxAutomationPeer.cs
- MemberAccessException.cs
- LinkUtilities.cs
- Schema.cs
- DBSqlParserTableCollection.cs
- BeginEvent.cs
- Margins.cs
- RayHitTestParameters.cs
- SystemThemeKey.cs
- CheckBoxField.cs
- RequiredAttributeAttribute.cs
- TextEncodedRawTextWriter.cs
- EmbossBitmapEffect.cs
- WebBaseEventKeyComparer.cs
- XmlUtil.cs
- SqlReferenceCollection.cs
- DefinitionProperties.cs
- CustomErrorsSectionWrapper.cs
- Normalizer.cs
- WsdlImporterElement.cs
- ContentPlaceHolder.cs
- ElementMarkupObject.cs
- EastAsianLunisolarCalendar.cs
- StringAnimationBase.cs
- RemoteWebConfigurationHost.cs
- UnmanagedMarshal.cs
- SqlDataSourceQueryEditor.cs
- LockedAssemblyCache.cs
- WebPartHelpVerb.cs
- HttpCachePolicy.cs
- ObjectListItemCollection.cs
- IDReferencePropertyAttribute.cs
- HMACMD5.cs
- SetterBase.cs
- WindowVisualStateTracker.cs
- TypeDelegator.cs
- WebMethodAttribute.cs
- DescriptionCreator.cs
- SessionStateContainer.cs
- LabelLiteral.cs
- SqlNamer.cs
- CoTaskMemUnicodeSafeHandle.cs
- OracleCommand.cs
- HttpRuntimeSection.cs
- ConnectionStringSettings.cs
- ProcessThreadCollection.cs
- ContainerParaClient.cs
- PartialCachingAttribute.cs
- KernelTypeValidation.cs
- RecordsAffectedEventArgs.cs
- GenerateHelper.cs
- IODescriptionAttribute.cs
- XmlLangPropertyAttribute.cs
- WebServiceTypeData.cs
- VisualBrush.cs
- NonBatchDirectoryCompiler.cs
- QuaternionValueSerializer.cs
- BitmapData.cs
- ServicesUtilities.cs
- FilterInvalidBodyAccessException.cs
- DrawingCollection.cs
- FixedSOMPageElement.cs
- CodeDirectoryCompiler.cs
- TreeIterator.cs