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
- EventManager.cs
- EncoderReplacementFallback.cs
- ItemMap.cs
- XmlSchemaComplexType.cs
- RefreshPropertiesAttribute.cs
- LayoutEditorPart.cs
- DataGridViewTextBoxCell.cs
- BinaryCommonClasses.cs
- SafeLocalMemHandle.cs
- SiteMapDataSourceView.cs
- HMAC.cs
- RegexGroup.cs
- ToolStripOverflow.cs
- TrackingServices.cs
- XmlSchemaAnnotated.cs
- PixelShader.cs
- RecordBuilder.cs
- LabelDesigner.cs
- InsufficientMemoryException.cs
- AutomationTextAttribute.cs
- XmlToDatasetMap.cs
- SplineKeyFrames.cs
- WebServiceParameterData.cs
- MsmqElementBase.cs
- FontUnitConverter.cs
- OletxTransactionManager.cs
- InputScope.cs
- DateTimeConverter2.cs
- TextChangedEventArgs.cs
- Point4DConverter.cs
- ClientApiGenerator.cs
- StylusDownEventArgs.cs
- WebBaseEventKeyComparer.cs
- SystemInformation.cs
- DataGridColumnsPage.cs
- ProcessThread.cs
- ThrowHelper.cs
- SessionStateUtil.cs
- BaseResourcesBuildProvider.cs
- PatternMatcher.cs
- VectorKeyFrameCollection.cs
- PartManifestEntry.cs
- PointCollection.cs
- DecoderReplacementFallback.cs
- NativeMethods.cs
- SourceSwitch.cs
- ASCIIEncoding.cs
- EntityDataSourceSelectedEventArgs.cs
- QilName.cs
- ResourcePool.cs
- InvalidPropValue.cs
- RadioButtonFlatAdapter.cs
- EntityDataSourceContainerNameConverter.cs
- CodeExporter.cs
- counter.cs
- SymmetricCryptoHandle.cs
- documentsequencetextcontainer.cs
- Transform.cs
- OutputWindow.cs
- IndentedWriter.cs
- SerializationFieldInfo.cs
- InstanceCreationEditor.cs
- MulticastNotSupportedException.cs
- TempFiles.cs
- JulianCalendar.cs
- DesigntimeLicenseContextSerializer.cs
- SqlMethods.cs
- DataContractJsonSerializerOperationBehavior.cs
- SharedStatics.cs
- Button.cs
- SystemGatewayIPAddressInformation.cs
- VerticalAlignConverter.cs
- DataGridViewCellMouseEventArgs.cs
- ClientTargetCollection.cs
- DurableServiceAttribute.cs
- GiveFeedbackEvent.cs
- PathSegment.cs
- StreamInfo.cs
- XmlSignatureProperties.cs
- ExpressionVisitor.cs
- TextTreeFixupNode.cs
- CounterSet.cs
- InkCanvasSelection.cs
- DelegateSerializationHolder.cs
- EntityDataSourceViewSchema.cs
- IdnMapping.cs
- DataServiceException.cs
- DataGridViewCellStyleEditor.cs
- BinaryObjectInfo.cs
- ExpressionTable.cs
- ExpandCollapseProviderWrapper.cs
- DecimalStorage.cs
- DigitShape.cs
- PolicyStatement.cs
- SQLChars.cs
- PropertyEmitterBase.cs
- SiteMap.cs
- connectionpool.cs
- SelectiveScrollingGrid.cs
- FigureParaClient.cs