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
- AdRotatorDesigner.cs
- PrintDocument.cs
- XmlEncodedRawTextWriter.cs
- PermissionSetEnumerator.cs
- XmlNamespaceMapping.cs
- UDPClient.cs
- StateChangeEvent.cs
- _Connection.cs
- CodeTypeDeclarationCollection.cs
- StaticTextPointer.cs
- FixedLineResult.cs
- EdmType.cs
- GridViewUpdatedEventArgs.cs
- InputProviderSite.cs
- InvalidPrinterException.cs
- DiffuseMaterial.cs
- EventLogException.cs
- HierarchicalDataBoundControlAdapter.cs
- ChannelCredentials.cs
- CheckBox.cs
- AssemblyHelper.cs
- SafeNativeMethods.cs
- MimeWriter.cs
- RegisteredHiddenField.cs
- OutputCacheEntry.cs
- MailAddressParser.cs
- GenericAuthenticationEventArgs.cs
- ValuePatternIdentifiers.cs
- ModelItemDictionary.cs
- ResourceAssociationSetEnd.cs
- FullTrustAssembliesSection.cs
- WindowsTokenRoleProvider.cs
- SmiMetaDataProperty.cs
- ArrayTypeMismatchException.cs
- InfoCardTrace.cs
- Char.cs
- FormViewDeleteEventArgs.cs
- Object.cs
- SimpleWorkerRequest.cs
- ColumnTypeConverter.cs
- MiniCustomAttributeInfo.cs
- SecureStringHasher.cs
- DataGridColumnCollection.cs
- EllipseGeometry.cs
- GraphicsPathIterator.cs
- EntityDataSourceDesignerHelper.cs
- CheckBoxAutomationPeer.cs
- DiscriminatorMap.cs
- DeclarationUpdate.cs
- ImageDrawing.cs
- DelegatingChannelListener.cs
- DataRecordInfo.cs
- GatewayIPAddressInformationCollection.cs
- ImageSourceValueSerializer.cs
- DiagnosticsConfigurationHandler.cs
- Base64Stream.cs
- XhtmlBasicTextBoxAdapter.cs
- xsdvalidator.cs
- StrokeIntersection.cs
- OpenTypeLayout.cs
- KeyValuePairs.cs
- ClockController.cs
- Int32Converter.cs
- SingleKeyFrameCollection.cs
- FontStretchConverter.cs
- Point3DConverter.cs
- NavigationFailedEventArgs.cs
- PageParserFilter.cs
- TaskHelper.cs
- QilLoop.cs
- DurableInstanceManager.cs
- CodePageUtils.cs
- SqlRewriteScalarSubqueries.cs
- TableLayoutSettingsTypeConverter.cs
- IEnumerable.cs
- ProtocolsConfigurationHandler.cs
- UserControl.cs
- AxHost.cs
- GridLengthConverter.cs
- WindowsTab.cs
- MenuItemStyle.cs
- HandledEventArgs.cs
- CodeIdentifiers.cs
- ShaderRenderModeValidation.cs
- FieldNameLookup.cs
- Stream.cs
- CompilerScopeManager.cs
- DependencyProperty.cs
- HttpContextServiceHost.cs
- StyleSheetRefUrlEditor.cs
- BufferAllocator.cs
- DynamicQueryableWrapper.cs
- OracleCommandSet.cs
- Stack.cs
- MTConfigUtil.cs
- TextParagraphProperties.cs
- MsmqIntegrationReceiveParameters.cs
- TypefaceMetricsCache.cs
- ListMarkerSourceInfo.cs
- WorkflowViewElement.cs