Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- PropertyEmitter.cs
- UrlPropertyAttribute.cs
- TcpClientChannel.cs
- ItemContainerPattern.cs
- DataGridTable.cs
- HMAC.cs
- DefaultHttpHandler.cs
- RuleAction.cs
- Int32CollectionConverter.cs
- SoapHttpTransportImporter.cs
- GridItemCollection.cs
- AttachedAnnotation.cs
- xmlglyphRunInfo.cs
- RuntimeIdentifierPropertyAttribute.cs
- ZipPackage.cs
- RightsManagementEncryptionTransform.cs
- XmlSchemaSimpleContentRestriction.cs
- RoleServiceManager.cs
- WebPartConnectionsConnectVerb.cs
- HtmlInputFile.cs
- CommonXSendMessage.cs
- ReflectionUtil.cs
- XmlStreamStore.cs
- QuotedPrintableStream.cs
- DataGridViewColumnDesigner.cs
- WorkflowMarkupElementEventArgs.cs
- JsonObjectDataContract.cs
- RadioButtonBaseAdapter.cs
- DoubleUtil.cs
- shaperfactoryquerycacheentry.cs
- DnsPermission.cs
- DataControlPagerLinkButton.cs
- DataGridViewControlCollection.cs
- ExceptionHandlerDesigner.cs
- MSHTMLHost.cs
- QuerySettings.cs
- ThicknessAnimation.cs
- OrderByExpression.cs
- ProgramPublisher.cs
- ConfigurationSectionCollection.cs
- CompiledQuery.cs
- IResourceProvider.cs
- FrameworkElement.cs
- HandlerWithFactory.cs
- counter.cs
- Int16AnimationUsingKeyFrames.cs
- WindowsSspiNegotiation.cs
- ClientSettingsStore.cs
- OleDbSchemaGuid.cs
- TextBlock.cs
- XmlDataCollection.cs
- ZeroOpNode.cs
- Enlistment.cs
- PassportPrincipal.cs
- DesignTimeHTMLTextWriter.cs
- TimerElapsedEvenArgs.cs
- StorageComplexTypeMapping.cs
- DbTransaction.cs
- TableAdapterManagerNameHandler.cs
- JumpTask.cs
- DynamicRendererThreadManager.cs
- MobileControlBuilder.cs
- FixedSOMTable.cs
- DataView.cs
- PolicyStatement.cs
- basevalidator.cs
- ILGenerator.cs
- XPathMultyIterator.cs
- FormatException.cs
- ListInitExpression.cs
- ConfigXmlElement.cs
- AttributeCollection.cs
- SortableBindingList.cs
- Stackframe.cs
- TaiwanCalendar.cs
- EnumValidator.cs
- ServiceModelConfigurationElementCollection.cs
- SecurityTokenResolver.cs
- MultiPageTextView.cs
- ObjectReaderCompiler.cs
- MessageTraceRecord.cs
- ADMembershipProvider.cs
- SetIterators.cs
- MessageDecoder.cs
- Geometry.cs
- PanelStyle.cs
- DBSqlParser.cs
- EncodingDataItem.cs
- DataRow.cs
- WebPartExportVerb.cs
- CompiledQueryCacheEntry.cs
- NotifyIcon.cs
- Point3DConverter.cs
- XmlEntity.cs
- ToolStripProgressBar.cs
- NamespaceCollection.cs
- ToolStripControlHost.cs
- OdbcPermission.cs
- CookieParameter.cs
- PackUriHelper.cs