Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- WindowsToolbarItemAsMenuItem.cs
- CqlBlock.cs
- DependencyObjectPropertyDescriptor.cs
- HwndMouseInputProvider.cs
- FreezableOperations.cs
- PrintEvent.cs
- _CookieModule.cs
- EventLog.cs
- TimeoutException.cs
- ReflectEventDescriptor.cs
- SubMenuStyleCollectionEditor.cs
- FrameworkName.cs
- GenericEnumConverter.cs
- MetaTable.cs
- URLIdentityPermission.cs
- LockedBorderGlyph.cs
- Polyline.cs
- StateMachine.cs
- DesignerActionHeaderItem.cs
- TextureBrush.cs
- UnmanagedMemoryStream.cs
- XmlExtensionFunction.cs
- CompiledRegexRunner.cs
- TextTreeText.cs
- DataContractSerializerOperationBehavior.cs
- EventMappingSettings.cs
- DragEventArgs.cs
- TypeReference.cs
- ListViewDataItem.cs
- Overlapped.cs
- Thread.cs
- HttpListenerRequest.cs
- RegexFCD.cs
- TreeNodeStyleCollection.cs
- EventProviderWriter.cs
- DesignTimeXamlWriter.cs
- MsmqProcessProtocolHandler.cs
- AppPool.cs
- SamlAuthorizationDecisionClaimResource.cs
- StickyNoteContentControl.cs
- ValidationSummary.cs
- DataSvcMapFile.cs
- XamlReaderHelper.cs
- SchemaImporterExtensionElement.cs
- SerializationAttributes.cs
- MailMessageEventArgs.cs
- BaseCollection.cs
- DesignerDataSourceView.cs
- FrameworkPropertyMetadata.cs
- PngBitmapDecoder.cs
- ConfigXmlCDataSection.cs
- TableLayoutPanel.cs
- XmlSchemaException.cs
- ListDesigner.cs
- KeyboardNavigation.cs
- RootDesignerSerializerAttribute.cs
- DataIdProcessor.cs
- SqlDataSourceCommandParser.cs
- EdmSchemaAttribute.cs
- Interlocked.cs
- RemoteHelper.cs
- ObjectCloneHelper.cs
- PointAnimation.cs
- FixedDocument.cs
- RadioButtonRenderer.cs
- CodeDelegateInvokeExpression.cs
- BrowsableAttribute.cs
- UxThemeWrapper.cs
- EventSchemaTraceListener.cs
- SpecialFolderEnumConverter.cs
- SimpleApplicationHost.cs
- GeneralTransform2DTo3DTo2D.cs
- VarInfo.cs
- MissingMemberException.cs
- EncoderBestFitFallback.cs
- HttpWebRequestElement.cs
- Compilation.cs
- ContainerUIElement3D.cs
- NameTable.cs
- MsmqMessageSerializationFormat.cs
- MemberExpressionHelper.cs
- TemplateParser.cs
- XmlNavigatorStack.cs
- TransactionScope.cs
- BoundColumn.cs
- DataSetUtil.cs
- EdmFunction.cs
- Button.cs
- TranslateTransform.cs
- _CacheStreams.cs
- ComponentEditorForm.cs
- EventLogConfiguration.cs
- Config.cs
- RelationshipWrapper.cs
- SystemResourceHost.cs
- XmlTextEncoder.cs
- CultureNotFoundException.cs
- InfoCardSymmetricAlgorithm.cs
- X509ChainElement.cs
- SiteMapNode.cs