Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / Animation / TimeEnumHelper.cs / 1305600 / 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
- EventHandlerList.cs
- CodeIndexerExpression.cs
- PersistencePipeline.cs
- MsmqTransportSecurityElement.cs
- ParserStack.cs
- AudioException.cs
- Gdiplus.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- GridViewCancelEditEventArgs.cs
- IInstanceTable.cs
- MessageQueueConverter.cs
- SynchronizedDispatch.cs
- ModelPropertyImpl.cs
- CompilationRelaxations.cs
- HttpRuntime.cs
- UrlPropertyAttribute.cs
- ExpressionReplacer.cs
- TextEffect.cs
- TraceFilter.cs
- WindowsGraphics2.cs
- QilPatternVisitor.cs
- OracleParameterBinding.cs
- ManipulationStartingEventArgs.cs
- typedescriptorpermission.cs
- ProxyWebPart.cs
- SqlCrossApplyToCrossJoin.cs
- ControlBuilder.cs
- PropertyValidationContext.cs
- CapabilitiesUse.cs
- HMAC.cs
- WorkflowCompensationBehavior.cs
- SafeSecurityHandles.cs
- XmlSchemaAnnotation.cs
- ButtonBase.cs
- FactoryGenerator.cs
- MemberAccessException.cs
- WebFormDesignerActionService.cs
- DLinqAssociationProvider.cs
- Tablet.cs
- WebServiceHandler.cs
- FixedDSBuilder.cs
- _AuthenticationState.cs
- GenericUriParser.cs
- RangeValidator.cs
- Invariant.cs
- GraphicsPathIterator.cs
- LongSumAggregationOperator.cs
- IISUnsafeMethods.cs
- NavigationPropertyEmitter.cs
- Pool.cs
- PropertyGeneratedEventArgs.cs
- DataGridViewLinkColumn.cs
- InputScope.cs
- LayoutManager.cs
- PanelDesigner.cs
- __Filters.cs
- SqlConnectionFactory.cs
- TextElementCollection.cs
- HttpHandlerActionCollection.cs
- EntityContainerAssociationSet.cs
- WhitespaceRuleReader.cs
- WindowInteractionStateTracker.cs
- UInt16Converter.cs
- DataRelationPropertyDescriptor.cs
- Dictionary.cs
- SHA1Cng.cs
- InfoCardSymmetricCrypto.cs
- FilterQuery.cs
- ItemCheckEvent.cs
- PropertyItem.cs
- MarkerProperties.cs
- PopupEventArgs.cs
- CompModSwitches.cs
- AggregateNode.cs
- SoapHeaderException.cs
- ImmutableClientRuntime.cs
- WorkItem.cs
- CacheMode.cs
- InkCanvasAutomationPeer.cs
- ConfigXmlWhitespace.cs
- QueryNode.cs
- FontStyles.cs
- TypefaceMetricsCache.cs
- _HTTPDateParse.cs
- RenderContext.cs
- MethodBuilderInstantiation.cs
- RecognizerBase.cs
- FormViewInsertedEventArgs.cs
- PlanCompilerUtil.cs
- HMAC.cs
- CacheChildrenQuery.cs
- RoutedEventValueSerializer.cs
- BitmapEffectCollection.cs
- WindowsListBox.cs
- QilTernary.cs
- DesignerUtility.cs
- CurrentChangingEventManager.cs
- Application.cs
- HierarchicalDataBoundControlAdapter.cs
- SpotLight.cs