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
- figurelengthconverter.cs
- MessageQueueInstaller.cs
- hresults.cs
- ReachPageContentCollectionSerializerAsync.cs
- WmpBitmapDecoder.cs
- Version.cs
- OrderedDictionary.cs
- XsltOutput.cs
- ItemType.cs
- PointLightBase.cs
- BrushMappingModeValidation.cs
- RegexBoyerMoore.cs
- VarRemapper.cs
- Model3DGroup.cs
- TextEditorTables.cs
- InputReferenceExpression.cs
- GroupBoxRenderer.cs
- HandlerBase.cs
- ComponentResourceKey.cs
- RectAnimationUsingKeyFrames.cs
- EntityClientCacheKey.cs
- SecurityElement.cs
- webproxy.cs
- DocumentApplicationState.cs
- ResourceDictionary.cs
- CategoryNameCollection.cs
- LicFileLicenseProvider.cs
- BitmapEffectInputConnector.cs
- SafeRegistryKey.cs
- RegexGroupCollection.cs
- CodeSnippetCompileUnit.cs
- TypeUtil.cs
- JsonSerializer.cs
- SetStoryboardSpeedRatio.cs
- InternalControlCollection.cs
- ListControlDataBindingHandler.cs
- Geometry3D.cs
- DaylightTime.cs
- AnnotationObservableCollection.cs
- ByteAnimationUsingKeyFrames.cs
- VectorCollection.cs
- ViewEventArgs.cs
- IssuedTokenParametersElement.cs
- SearchForVirtualItemEventArgs.cs
- ButtonColumn.cs
- CollectionChangedEventManager.cs
- SqlDataSource.cs
- ComNativeDescriptor.cs
- DispatchChannelSink.cs
- ListViewItemSelectionChangedEvent.cs
- UITypeEditor.cs
- ColumnReorderedEventArgs.cs
- ListViewAutomationPeer.cs
- TypeDescriptionProvider.cs
- WebPartConnectVerb.cs
- SqlUtils.cs
- CachedCompositeFamily.cs
- DataSourceExpression.cs
- LocalFileSettingsProvider.cs
- PrimitiveCodeDomSerializer.cs
- PointCollection.cs
- SiteMapSection.cs
- Constant.cs
- XmlDocument.cs
- StaticResourceExtension.cs
- Opcode.cs
- ScriptReferenceBase.cs
- DoubleAnimation.cs
- ComplexPropertyEntry.cs
- StoragePropertyMapping.cs
- XmlCompatibilityReader.cs
- UriWriter.cs
- PingReply.cs
- EntityDataSourceViewSchema.cs
- SubMenuStyle.cs
- TypeBuilder.cs
- DataControlFieldCell.cs
- DataSourceView.cs
- NumberSubstitution.cs
- FlagPanel.cs
- TranslateTransform3D.cs
- ProjectionRewriter.cs
- ProfileBuildProvider.cs
- QueryableFilterUserControl.cs
- InputMethod.cs
- DefaultValueAttribute.cs
- CellQuery.cs
- Pen.cs
- StylusEventArgs.cs
- MetadataFile.cs
- UpdatePanel.cs
- FlowDecisionDesigner.xaml.cs
- ListManagerBindingsCollection.cs
- PrintingPermissionAttribute.cs
- DispatchWrapper.cs
- Compiler.cs
- Perspective.cs
- InternalUserCancelledException.cs
- ServiceDesigner.cs
- DateTimeConverter.cs