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
- RowVisual.cs
- Ppl.cs
- TableProviderWrapper.cs
- GorillaCodec.cs
- RangeValuePattern.cs
- GroupLabel.cs
- DefaultHttpHandler.cs
- InvokeHandlers.cs
- DataListComponentEditor.cs
- NetTcpBindingCollectionElement.cs
- Content.cs
- DataListItemCollection.cs
- DotExpr.cs
- ContainerControlDesigner.cs
- TransformedBitmap.cs
- CodeAccessSecurityEngine.cs
- AppearanceEditorPart.cs
- XPathNodeInfoAtom.cs
- DataGridViewComboBoxColumnDesigner.cs
- XComponentModel.cs
- DependencyStoreSurrogate.cs
- _emptywebproxy.cs
- DataGridItem.cs
- HttpBrowserCapabilitiesBase.cs
- CodeStatementCollection.cs
- FileSystemEnumerable.cs
- SemaphoreFullException.cs
- PlainXmlSerializer.cs
- GridViewCellAutomationPeer.cs
- WorkflowMarkupSerializationManager.cs
- ListDictionary.cs
- XmlArrayItemAttribute.cs
- RequestQueryProcessor.cs
- XsltConvert.cs
- BoolExpression.cs
- GridViewUpdatedEventArgs.cs
- DataGridViewRowCollection.cs
- GZipDecoder.cs
- OperationCanceledException.cs
- NativeMethods.cs
- ShapingWorkspace.cs
- InstanceDescriptor.cs
- TextElementCollectionHelper.cs
- ProtocolsSection.cs
- SortDescriptionCollection.cs
- CriticalFileToken.cs
- LoginName.cs
- ShellProvider.cs
- DataServiceRequestException.cs
- metadatamappinghashervisitor.cs
- XPathItem.cs
- MatrixIndependentAnimationStorage.cs
- TextMetrics.cs
- ResourceDescriptionAttribute.cs
- RouteData.cs
- BuildProvider.cs
- ResourcesGenerator.cs
- SchemaMerger.cs
- RegisteredDisposeScript.cs
- SpeechDetectedEventArgs.cs
- HostingPreferredMapPath.cs
- TraceSwitch.cs
- FormViewModeEventArgs.cs
- FlowDocumentView.cs
- BuildProvider.cs
- CommandLibraryHelper.cs
- Package.cs
- UpDownBase.cs
- SimpleTableProvider.cs
- InheritedPropertyChangedEventArgs.cs
- SafeRightsManagementHandle.cs
- ProtectedConfigurationSection.cs
- System.Data.OracleClient_BID.cs
- DbSource.cs
- TextRunTypographyProperties.cs
- SchemaNames.cs
- DEREncoding.cs
- COM2PictureConverter.cs
- VirtualDirectoryMapping.cs
- DesignerTransaction.cs
- ConfigurationException.cs
- TaskExceptionHolder.cs
- ToolboxBitmapAttribute.cs
- Rect3D.cs
- ConnectionManagementSection.cs
- EntityDataSourceEntitySetNameItem.cs
- NativeWindow.cs
- AssemblyBuilder.cs
- RuleSettings.cs
- PaperSize.cs
- WebPartDisplayModeCancelEventArgs.cs
- SqlPersonalizationProvider.cs
- PathFigureCollectionValueSerializer.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- UnrecognizedPolicyAssertionElement.cs
- LicenseContext.cs
- XmlDocumentFieldSchema.cs
- GroupItemAutomationPeer.cs
- ReflectTypeDescriptionProvider.cs
- SmiContextFactory.cs