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
- CommandLineParser.cs
- WindowsGraphicsWrapper.cs
- IpcPort.cs
- SHA512.cs
- Itemizer.cs
- DbConnectionFactory.cs
- DrawingContextWalker.cs
- TextSelection.cs
- NetDispatcherFaultException.cs
- WeakReferenceEnumerator.cs
- CfgParser.cs
- TraceHwndHost.cs
- WebPartCatalogAddVerb.cs
- TypeUsage.cs
- ProtocolElementCollection.cs
- TranslateTransform.cs
- GradientBrush.cs
- DoubleLinkListEnumerator.cs
- NullableIntMinMaxAggregationOperator.cs
- SamlAssertionKeyIdentifierClause.cs
- DrawingVisual.cs
- XmlSchemaValidationException.cs
- EngineSite.cs
- ILGen.cs
- XmlEncoding.cs
- DefaultValueAttribute.cs
- BCLDebug.cs
- XmlHelper.cs
- PersonalizationEntry.cs
- DispatcherFrame.cs
- Annotation.cs
- CharStorage.cs
- InputLanguageProfileNotifySink.cs
- Int64Storage.cs
- WorkflowServiceBehavior.cs
- TextServicesHost.cs
- Span.cs
- ClientTargetCollection.cs
- CodeNamespaceImportCollection.cs
- ThreadExceptionDialog.cs
- StateWorkerRequest.cs
- FunctionImportElement.cs
- XamlHostingSection.cs
- InfiniteIntConverter.cs
- ColumnWidthChangingEvent.cs
- OlePropertyStructs.cs
- SignerInfo.cs
- EntitySqlQueryCacheEntry.cs
- AnnotationStore.cs
- MatchingStyle.cs
- ILGenerator.cs
- XmlKeywords.cs
- __Error.cs
- XslTransform.cs
- WebPartManager.cs
- ButtonBase.cs
- ProvideValueServiceProvider.cs
- TransformerInfo.cs
- cookiecontainer.cs
- ExtenderProvidedPropertyAttribute.cs
- DataServiceResponse.cs
- WebBrowser.cs
- ModelItemDictionaryImpl.cs
- ObjectTokenCategory.cs
- Point.cs
- SqlParameterizer.cs
- TransportSecurityBindingElement.cs
- ValidationEventArgs.cs
- DataGridViewCellStateChangedEventArgs.cs
- CodeExporter.cs
- XmlQueryTypeFactory.cs
- BuildProviderInstallComponent.cs
- ImageFormatConverter.cs
- AutomationIdentifier.cs
- MediaTimeline.cs
- Rfc4050KeyFormatter.cs
- SqlCaseSimplifier.cs
- Convert.cs
- SettingsSection.cs
- AnonymousIdentificationSection.cs
- CompilerInfo.cs
- Point3D.cs
- DataTableMapping.cs
- StorageConditionPropertyMapping.cs
- DecoderExceptionFallback.cs
- HttpProfileGroupBase.cs
- ZipIOLocalFileHeader.cs
- MenuScrollingVisibilityConverter.cs
- ValueUnavailableException.cs
- FilterableAttribute.cs
- DataGridViewTextBoxColumn.cs
- ApplicationActivator.cs
- StickyNoteAnnotations.cs
- HttpStreams.cs
- SessionViewState.cs
- ClientData.cs
- IdnMapping.cs
- Attachment.cs
- _DomainName.cs
- httpstaticobjectscollection.cs