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
- translator.cs
- SecurityHelper.cs
- TraceEventCache.cs
- XmlSchemaRedefine.cs
- DecimalAnimationBase.cs
- DbModificationClause.cs
- SaveFileDialogDesigner.cs
- AspNetSynchronizationContext.cs
- DoubleCollectionConverter.cs
- SynthesizerStateChangedEventArgs.cs
- UpdateInfo.cs
- ConsoleCancelEventArgs.cs
- ConfigurationProperty.cs
- OracleBFile.cs
- ColumnMapCopier.cs
- AttributeQuery.cs
- CalendarAutoFormat.cs
- SelectionEditor.cs
- _OSSOCK.cs
- DictionaryEntry.cs
- IListConverters.cs
- TextAutomationPeer.cs
- TransformGroup.cs
- HtmlTableRow.cs
- XmlEncoding.cs
- input.cs
- CodeMethodInvokeExpression.cs
- WebPartZoneCollection.cs
- ColumnHeaderConverter.cs
- ShaderRenderModeValidation.cs
- DiscreteKeyFrames.cs
- XPathNavigator.cs
- ElementAction.cs
- SystemTcpConnection.cs
- TypeDependencyAttribute.cs
- documentsequencetextpointer.cs
- SQLMoney.cs
- SelectionItemProviderWrapper.cs
- DataGridViewImageColumn.cs
- ToolStripDropTargetManager.cs
- MultiPageTextView.cs
- MediaTimeline.cs
- BrowserCapabilitiesCodeGenerator.cs
- LogicalExpressionEditor.cs
- ExpressionEditorAttribute.cs
- MiniConstructorInfo.cs
- Size3D.cs
- TimeStampChecker.cs
- ApplicationDirectory.cs
- ControlBuilder.cs
- Simplifier.cs
- LogExtent.cs
- Int32.cs
- DataException.cs
- TypeExtensionConverter.cs
- ListViewEditEventArgs.cs
- X509PeerCertificateElement.cs
- GridViewUpdateEventArgs.cs
- WebServiceReceiveDesigner.cs
- PrintDialogDesigner.cs
- XsltOutput.cs
- ReflectionHelper.cs
- MemoryStream.cs
- HostExecutionContextManager.cs
- DataGridViewHitTestInfo.cs
- ActivityDesignerHelper.cs
- SingleConverter.cs
- ChangeDirector.cs
- ReflectionPermission.cs
- WSDualHttpBindingCollectionElement.cs
- ObjectStateManagerMetadata.cs
- XsltLibrary.cs
- DiscoveryInnerClientAdhoc11.cs
- Pkcs9Attribute.cs
- NotImplementedException.cs
- PageTheme.cs
- SessionParameter.cs
- XmlWellformedWriterHelpers.cs
- TextPenaltyModule.cs
- CfgParser.cs
- DbCommandTree.cs
- TitleStyle.cs
- LongPath.cs
- Single.cs
- XomlCompilerResults.cs
- EditCommandColumn.cs
- SafeFileHandle.cs
- _SSPIWrapper.cs
- GroupBoxAutomationPeer.cs
- RemotingHelper.cs
- InputProcessorProfiles.cs
- EntityContainerAssociationSet.cs
- ResizeBehavior.cs
- TextSelectionHelper.cs
- DataTableTypeConverter.cs
- Journal.cs
- ScriptingJsonSerializationSection.cs
- Error.cs
- TextElement.cs
- CodeThrowExceptionStatement.cs