Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- CommonGetThemePartSize.cs
- WindowsFormsLinkLabel.cs
- AppDomainUnloadedException.cs
- TypeConstant.cs
- IntegerCollectionEditor.cs
- ProcessModelInfo.cs
- DbConnectionInternal.cs
- TypeBinaryExpression.cs
- RoleGroupCollection.cs
- WorkflowViewElement.cs
- ObjectContextServiceProvider.cs
- BufferModeSettings.cs
- GridViewUpdateEventArgs.cs
- CheckBoxField.cs
- Visual3DCollection.cs
- FaultFormatter.cs
- StateWorkerRequest.cs
- XPathNodeList.cs
- PriorityChain.cs
- PointAnimationUsingPath.cs
- UnknownBitmapEncoder.cs
- UriParserTemplates.cs
- HttpApplication.cs
- _AutoWebProxyScriptWrapper.cs
- PrintPageEvent.cs
- OleDbParameter.cs
- AssemblyBuilderData.cs
- ScrollEventArgs.cs
- UpdateException.cs
- InfoCardKeyedHashAlgorithm.cs
- ParallelEnumerableWrapper.cs
- XmlDownloadManager.cs
- RegexWorker.cs
- CommentEmitter.cs
- HttpUnhandledOperationInvoker.cs
- CacheModeValueSerializer.cs
- DocumentScope.cs
- _RequestCacheProtocol.cs
- smtppermission.cs
- GridViewRow.cs
- ManagementObjectSearcher.cs
- SqlMetaData.cs
- Row.cs
- CoreSwitches.cs
- JapaneseLunisolarCalendar.cs
- DefaultEvaluationContext.cs
- RelationshipSet.cs
- ReliabilityContractAttribute.cs
- PropertyGroupDescription.cs
- TypographyProperties.cs
- SystemInformation.cs
- DataTransferEventArgs.cs
- GeneralTransform3DTo2DTo3D.cs
- UniformGrid.cs
- AudioLevelUpdatedEventArgs.cs
- DiscreteKeyFrames.cs
- SafeLibraryHandle.cs
- ObfuscateAssemblyAttribute.cs
- IsolatedStorageFilePermission.cs
- PageParser.cs
- DataGridViewEditingControlShowingEventArgs.cs
- PointLight.cs
- WpfGeneratedKnownTypes.cs
- MemberNameValidator.cs
- OleDbDataReader.cs
- RegexParser.cs
- WebPartConnectionsDisconnectVerb.cs
- DefaultAsyncDataDispatcher.cs
- SessionPageStatePersister.cs
- TextEditorParagraphs.cs
- EdmToObjectNamespaceMap.cs
- MultiByteCodec.cs
- DynamicDataRoute.cs
- FlowDocumentPage.cs
- SchemaTableOptionalColumn.cs
- MiniModule.cs
- IApplicationTrustManager.cs
- RtfControls.cs
- FunctionQuery.cs
- EncodingNLS.cs
- SingleAnimation.cs
- RowToParametersTransformer.cs
- WebPartHelpVerb.cs
- MyContact.cs
- StringWriter.cs
- SelectingProviderEventArgs.cs
- SQLBytes.cs
- ButtonBaseAdapter.cs
- BasicHttpMessageCredentialType.cs
- CellLabel.cs
- RTLAwareMessageBox.cs
- FormViewModeEventArgs.cs
- FlowLayoutSettings.cs
- AssemblyNameProxy.cs
- UIElementParagraph.cs
- Span.cs
- MsiStyleLogWriter.cs
- VirtualizingStackPanel.cs
- UncommonField.cs
- XPathArrayIterator.cs