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
- DesignerDataTableBase.cs
- ObjectConverter.cs
- regiisutil.cs
- ResourceDictionaryCollection.cs
- BinarySerializer.cs
- ListViewInsertionMark.cs
- Lease.cs
- SQLDecimal.cs
- ComplexTypeEmitter.cs
- Helper.cs
- SrgsDocumentParser.cs
- DiffuseMaterial.cs
- LineBreakRecord.cs
- XmlKeywords.cs
- Mouse.cs
- ProfessionalColors.cs
- MulticastDelegate.cs
- ping.cs
- DataRecord.cs
- DynamicResourceExtensionConverter.cs
- GridViewCommandEventArgs.cs
- TextFindEngine.cs
- AppAction.cs
- InputReportEventArgs.cs
- HybridObjectCache.cs
- TypeToArgumentTypeConverter.cs
- AdjustableArrowCap.cs
- HttpWrapper.cs
- DataGridColumn.cs
- CqlIdentifiers.cs
- BitSet.cs
- WriteTimeStream.cs
- CancellableEnumerable.cs
- UnmanagedMarshal.cs
- ConfigXmlCDataSection.cs
- Decimal.cs
- ToolTipAutomationPeer.cs
- CompilationUtil.cs
- ObjectConverter.cs
- XmlSigningNodeWriter.cs
- UpdateRecord.cs
- EncodingNLS.cs
- Utils.cs
- DataGridBoundColumn.cs
- MessageDecoder.cs
- SchemaTableOptionalColumn.cs
- DesignerWithHeader.cs
- CellRelation.cs
- CodeDirectoryCompiler.cs
- ListManagerBindingsCollection.cs
- _LocalDataStore.cs
- CompareInfo.cs
- SimpleBitVector32.cs
- TimeSpanOrInfiniteConverter.cs
- RoleManagerModule.cs
- QilInvokeLateBound.cs
- ConfigurationStrings.cs
- CustomCredentialPolicy.cs
- DataGridSortCommandEventArgs.cs
- WeakReference.cs
- AccessDataSource.cs
- DrawingContextDrawingContextWalker.cs
- TabControl.cs
- PingOptions.cs
- BaseTreeIterator.cs
- CodeSubDirectory.cs
- FlowDocumentPage.cs
- XmlParserContext.cs
- AssemblyResourceLoader.cs
- StatusBarPanel.cs
- HMACMD5.cs
- Compiler.cs
- QueueProcessor.cs
- TemplateInstanceAttribute.cs
- FormsIdentity.cs
- ContentIterators.cs
- LiteralText.cs
- PropVariant.cs
- BindUriHelper.cs
- Symbol.cs
- XmlObjectSerializerReadContextComplexJson.cs
- Privilege.cs
- BufferedReadStream.cs
- AppliedDeviceFiltersEditor.cs
- IRCollection.cs
- MonitoringDescriptionAttribute.cs
- ClientProxyGenerator.cs
- Rfc2898DeriveBytes.cs
- UnsafeNativeMethods.cs
- ContentPropertyAttribute.cs
- FileDialogPermission.cs
- LongAverageAggregationOperator.cs
- Dispatcher.cs
- Oci.cs
- XmlIncludeAttribute.cs
- XmlUTF8TextReader.cs
- ModelUtilities.cs
- Operators.cs
- SocketException.cs
- PrintingPermissionAttribute.cs