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
- ServiceReflector.cs
- ExponentialEase.cs
- MaterialGroup.cs
- ObjectDataSourceEventArgs.cs
- AutoResetEvent.cs
- DataGridSortCommandEventArgs.cs
- FixedTextSelectionProcessor.cs
- DescriptionAttribute.cs
- SemanticKeyElement.cs
- SqlTypesSchemaImporter.cs
- ControlEvent.cs
- ElementAtQueryOperator.cs
- InternalsVisibleToAttribute.cs
- OperationInfo.cs
- DecoratedNameAttribute.cs
- ImageInfo.cs
- _SSPIWrapper.cs
- ServiceMemoryGates.cs
- CfgArc.cs
- DbConnectionPoolGroup.cs
- TextElementAutomationPeer.cs
- BrowserDefinition.cs
- GPPOINTF.cs
- NonVisualControlAttribute.cs
- Oid.cs
- COAUTHINFO.cs
- TextBoxBase.cs
- ContextMenuService.cs
- Polyline.cs
- ProtocolsConfigurationEntry.cs
- XmlSchemaExternal.cs
- ToolStripArrowRenderEventArgs.cs
- OleDbPropertySetGuid.cs
- DPAPIProtectedConfigurationProvider.cs
- WSSecurityOneDotOneSendSecurityHeader.cs
- SqlIdentifier.cs
- HttpsChannelListener.cs
- StateItem.cs
- AppearanceEditorPart.cs
- PriorityQueue.cs
- ComplexType.cs
- DesignTimeTemplateParser.cs
- ListParagraph.cs
- FirstMatchCodeGroup.cs
- HTMLTextWriter.cs
- DynamicDataManager.cs
- BuildProviderCollection.cs
- SqlCommand.cs
- RightNameExpirationInfoPair.cs
- DocumentSequenceHighlightLayer.cs
- ErrorFormatter.cs
- IntSecurity.cs
- PropertiesTab.cs
- TableCell.cs
- HtmlFormWrapper.cs
- StringExpressionSet.cs
- TextSerializer.cs
- ThreadExceptionEvent.cs
- UpnEndpointIdentity.cs
- MappingException.cs
- ChangePasswordAutoFormat.cs
- VisualProxy.cs
- Polygon.cs
- Matrix3D.cs
- CompModHelpers.cs
- HostingEnvironment.cs
- TransformerInfoCollection.cs
- DateTime.cs
- PolyBezierSegmentFigureLogic.cs
- PackageFilter.cs
- NumericPagerField.cs
- CustomDictionarySources.cs
- Rule.cs
- CodeGenerator.cs
- MetadataArtifactLoaderResource.cs
- Stroke2.cs
- RegisteredDisposeScript.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- ScriptingAuthenticationServiceSection.cs
- BuildProviderAppliesToAttribute.cs
- RuleRefElement.cs
- TransactionScope.cs
- MessageParameterAttribute.cs
- PeerName.cs
- HtmlInputText.cs
- OptimisticConcurrencyException.cs
- ExtensibleClassFactory.cs
- OdbcPermission.cs
- ProcessProtocolHandler.cs
- SimpleHandlerFactory.cs
- DesignConnection.cs
- GridEntry.cs
- CredentialCache.cs
- XmlDataProvider.cs
- DataTableReader.cs
- TemplateField.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- InvalidPropValue.cs
- KeyFrames.cs
- PeerApplication.cs