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
- ScriptHandlerFactory.cs
- UserControlCodeDomTreeGenerator.cs
- TransformBlockRequest.cs
- StrongNameUtility.cs
- ExcCanonicalXml.cs
- SystemKeyConverter.cs
- SchemaImporterExtension.cs
- DecimalStorage.cs
- ActivityXRefConverter.cs
- TrackingProfile.cs
- ControlEvent.cs
- OverlappedAsyncResult.cs
- SocketManager.cs
- ProfileSection.cs
- TextTreeNode.cs
- Parallel.cs
- SystemWebCachingSectionGroup.cs
- GeometryDrawing.cs
- XPathNodePointer.cs
- FormattedText.cs
- HtmlValidatorAdapter.cs
- GlyphingCache.cs
- ComponentManagerBroker.cs
- SafeRightsManagementSessionHandle.cs
- DetailsViewUpdateEventArgs.cs
- IISMapPath.cs
- itemelement.cs
- GuidConverter.cs
- SetState.cs
- CopyAttributesAction.cs
- InputProcessorProfilesLoader.cs
- WizardPanelChangingEventArgs.cs
- DomainConstraint.cs
- TypeSystem.cs
- EditorZoneBase.cs
- DataGridViewColumnEventArgs.cs
- KeyEventArgs.cs
- DataTrigger.cs
- counter.cs
- RtfControls.cs
- ExpressionValueEditor.cs
- ReadingWritingEntityEventArgs.cs
- SR.cs
- FixedPage.cs
- DynamicActivityProperty.cs
- Image.cs
- XmlByteStreamReader.cs
- Rotation3DAnimation.cs
- ParameterInfo.cs
- EncodingConverter.cs
- EditCommandColumn.cs
- Italic.cs
- ContentValidator.cs
- HtmlGenericControl.cs
- HtmlElementErrorEventArgs.cs
- ModifyActivitiesPropertyDescriptor.cs
- VBIdentifierTrimConverter.cs
- MeshGeometry3D.cs
- DeflateInput.cs
- OutputCacheSection.cs
- CombinedGeometry.cs
- TypeSource.cs
- BitmapMetadata.cs
- DescendantQuery.cs
- HiddenFieldPageStatePersister.cs
- SystemNetHelpers.cs
- XmlSchemaParticle.cs
- TextModifier.cs
- StylusTouchDevice.cs
- WindowsRichEdit.cs
- FolderLevelBuildProvider.cs
- PageStatePersister.cs
- RegexGroupCollection.cs
- ApplicationGesture.cs
- InputScopeManager.cs
- TitleStyle.cs
- InvalidTimeZoneException.cs
- SafeCertificateContext.cs
- SourceLineInfo.cs
- Executor.cs
- TextPenaltyModule.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- TimelineGroup.cs
- MessageBuilder.cs
- TreeNodeBinding.cs
- XmlSchemaIdentityConstraint.cs
- XmlQueryRuntime.cs
- FixUp.cs
- ModifierKeysValueSerializer.cs
- XhtmlBasicTextBoxAdapter.cs
- UpdateExpressionVisitor.cs
- ThaiBuddhistCalendar.cs
- OwnerDrawPropertyBag.cs
- TreeNodeCollection.cs
- FilterQuery.cs
- WindowsFormsHelpers.cs
- HandleCollector.cs
- XmlDataSource.cs
- DesignerPerfEventProvider.cs
- QilInvoke.cs