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
- Math.cs
- WebBrowserPermission.cs
- DragCompletedEventArgs.cs
- httpstaticobjectscollection.cs
- ProcessHostMapPath.cs
- MimeFormReflector.cs
- EventLogPropertySelector.cs
- BrowserCapabilitiesCodeGenerator.cs
- ZipIOExtraFieldZip64Element.cs
- CodeDomLoader.cs
- EditorZoneBase.cs
- DataSourceCache.cs
- _Win32.cs
- tooltip.cs
- ExpandSegment.cs
- ConfigXmlSignificantWhitespace.cs
- ECDiffieHellmanCngPublicKey.cs
- CounterSampleCalculator.cs
- RegexWorker.cs
- formatter.cs
- EndEvent.cs
- QilGeneratorEnv.cs
- SqlClientMetaDataCollectionNames.cs
- XPathNode.cs
- ReflectPropertyDescriptor.cs
- WindowsFormsLinkLabel.cs
- lengthconverter.cs
- RootBrowserWindowProxy.cs
- ObjectTypeMapping.cs
- AvTraceFormat.cs
- WebControl.cs
- QilExpression.cs
- XmlDataCollection.cs
- DataBoundControl.cs
- ClassHandlersStore.cs
- XmlWrappingWriter.cs
- UriTemplateVariablePathSegment.cs
- StringWriter.cs
- LogExtent.cs
- StreamGeometry.cs
- DbParameterHelper.cs
- ADMembershipUser.cs
- WindowsFormsHost.cs
- CompilerCollection.cs
- WindowsAuthenticationEventArgs.cs
- TrustManagerMoreInformation.cs
- AuthenticationSection.cs
- COM2ExtendedTypeConverter.cs
- LogFlushAsyncResult.cs
- X509CertificateEndpointIdentity.cs
- CmsInterop.cs
- TextTreeTextBlock.cs
- InputMethod.cs
- Label.cs
- GregorianCalendarHelper.cs
- CapabilitiesUse.cs
- StringToken.cs
- SHA384.cs
- QuotedStringWriteStateInfo.cs
- ResXResourceReader.cs
- XmlSchemaComplexContentExtension.cs
- StrokeSerializer.cs
- _LocalDataStoreMgr.cs
- SerialPinChanges.cs
- TextDecoration.cs
- HitTestWithGeometryDrawingContextWalker.cs
- ContentPathSegment.cs
- EntityDataSourceMemberPath.cs
- TraversalRequest.cs
- BigInt.cs
- _NegotiateClient.cs
- base64Transforms.cs
- DbConnectionPoolGroup.cs
- StateRuntime.cs
- InstanceKeyNotReadyException.cs
- DataSourceHelper.cs
- DesignerHelpers.cs
- ListViewItemMouseHoverEvent.cs
- HttpRequest.cs
- remotingproxy.cs
- XmlSchemas.cs
- SplayTreeNode.cs
- AssemblySettingAttributes.cs
- GenericPrincipal.cs
- OleDbMetaDataFactory.cs
- InlineCollection.cs
- PropagatorResult.cs
- Matrix3DStack.cs
- ToolStripOverflowButton.cs
- ResourceExpressionBuilder.cs
- MemberHolder.cs
- PropertyManager.cs
- EntitySqlQueryState.cs
- WriteFileContext.cs
- FontStretchConverter.cs
- ToolBarTray.cs
- Pair.cs
- RuntimeConfigurationRecord.cs
- ReturnValue.cs
- IsolatedStorage.cs