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
- SslStream.cs
- TextFindEngine.cs
- cookieexception.cs
- MissingSatelliteAssemblyException.cs
- CatalogZone.cs
- MsmqException.cs
- TaiwanLunisolarCalendar.cs
- SystemWebCachingSectionGroup.cs
- SmtpNtlmAuthenticationModule.cs
- QueryInterceptorAttribute.cs
- BoolExpression.cs
- RequestResponse.cs
- datacache.cs
- DBSchemaRow.cs
- DefaultSerializationProviderAttribute.cs
- DataRowIndexBuffer.cs
- NullReferenceException.cs
- ListBoxItemWrapperAutomationPeer.cs
- BorderSidesEditor.cs
- CompiledRegexRunnerFactory.cs
- TableLayout.cs
- FamilyCollection.cs
- Clause.cs
- WeakEventTable.cs
- SQLInt32Storage.cs
- SafeTokenHandle.cs
- SecurityPolicyVersion.cs
- ToolStripItem.cs
- Typeface.cs
- EntryIndex.cs
- FixedNode.cs
- FilterQueryOptionExpression.cs
- CodeTypeConstructor.cs
- ScrollEventArgs.cs
- SequentialActivityDesigner.cs
- XamlPathDataSerializer.cs
- LateBoundBitmapDecoder.cs
- KeyedCollection.cs
- SqlAliasesReferenced.cs
- QueryInterceptorAttribute.cs
- ThemeDictionaryExtension.cs
- CriticalFinalizerObject.cs
- TemplateParser.cs
- Int32CollectionValueSerializer.cs
- SourceInterpreter.cs
- SqlUdtInfo.cs
- WebPartHelpVerb.cs
- SQLGuid.cs
- MSAAWinEventWrap.cs
- DateBoldEvent.cs
- HttpResponseHeader.cs
- CellParagraph.cs
- SqlNamer.cs
- HostingEnvironmentSection.cs
- AspCompat.cs
- ReadOnlyDictionary.cs
- Schedule.cs
- SQLDouble.cs
- ResourceContainerWrapper.cs
- ObjectStorage.cs
- EditorPartCollection.cs
- PointCollectionConverter.cs
- PenLineJoinValidation.cs
- localization.cs
- TypeExtensionConverter.cs
- PenThread.cs
- Win32MouseDevice.cs
- OdbcStatementHandle.cs
- TwoPhaseCommit.cs
- EdmFunctions.cs
- SafeRightsManagementSessionHandle.cs
- ObjectItemCollection.cs
- TabItemWrapperAutomationPeer.cs
- EmptyQuery.cs
- _HeaderInfoTable.cs
- XPathScanner.cs
- ReachDocumentPageSerializer.cs
- DescriptionAttribute.cs
- ClientProxyGenerator.cs
- SiteMapPath.cs
- SiteMapPathDesigner.cs
- Operand.cs
- x509utils.cs
- EmptyReadOnlyDictionaryInternal.cs
- ValueCollectionParameterReader.cs
- ThreadPool.cs
- RemotingAttributes.cs
- DetailsViewRowCollection.cs
- Filter.cs
- CodeTypeMember.cs
- DynamicUpdateCommand.cs
- RuntimeEnvironment.cs
- DateTimeConverter.cs
- HandleRef.cs
- TypeSource.cs
- HttpCapabilitiesBase.cs
- DetectEofStream.cs
- ToolStripHighContrastRenderer.cs
- UniformGrid.cs
- AssociationTypeEmitter.cs