Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Messaging / System / Messaging / ValidationUtility.cs / 1305376 / ValidationUtility.cs
namespace System.Messaging { using System; internal static class ValidationUtility { public static bool ValidateAccessControlEntryType(AccessControlEntryType value) { return (value >= AccessControlEntryType.Allow) && (value <= AccessControlEntryType.Revoke); } public static bool ValidateCryptographicProviderType(CryptographicProviderType value) { return (value >= CryptographicProviderType.None) && (value <= CryptographicProviderType.SttIss); } public static bool ValidateEncryptionAlgorithm(EncryptionAlgorithm value) { // // note that EncryptionAlgorithm has disjoined values // return (value == EncryptionAlgorithm.None) || (value == EncryptionAlgorithm.Rc2) || (value == EncryptionAlgorithm.Rc4); } public static bool ValidateEncryptionRequired(EncryptionRequired value) { return (value >= EncryptionRequired.None) && (value <=EncryptionRequired.Body); } public static bool ValidateHashAlgorithm(HashAlgorithm value) { // // note that HashAlgorithm has disjoined values // return (value == HashAlgorithm.None) || (value == HashAlgorithm.Md2) || (value == HashAlgorithm.Md4) || (value == HashAlgorithm.Md5) || (value == HashAlgorithm.Sha) || (value == HashAlgorithm.Mac); } public static bool ValidateMessageLookupAction(MessageLookupAction value) { // // note that MessageLookupAction has disjoined values // return (value == MessageLookupAction.Current) || (value == MessageLookupAction.Next) || (value == MessageLookupAction.Previous) || (value == MessageLookupAction.First) || (value == MessageLookupAction.Last); } public static bool ValidateMessagePriority(MessagePriority value) { return (value >= MessagePriority.Lowest) && (value <= MessagePriority.Highest); } public static bool ValidateMessageQueueTransactionType(MessageQueueTransactionType value) { // // note that MessageQueueTransactionType has disjoined values // return (value == MessageQueueTransactionType.None) || (value == MessageQueueTransactionType.Automatic) || (value == MessageQueueTransactionType.Single); } public static bool ValidateQueueAccessMode(QueueAccessMode value) { // // note that QueueAccessMode has disjoined values // return (value == QueueAccessMode.Send) || (value == QueueAccessMode.Peek) || (value == QueueAccessMode.Receive) || (value == QueueAccessMode.PeekAndAdmin) || (value == QueueAccessMode.ReceiveAndAdmin) || (value == QueueAccessMode.SendAndReceive); } public static bool ValidateTrusteeType(TrusteeType trustee) { return (trustee >= TrusteeType.Unknown) && (trustee <= TrusteeType.Computer); } } //class ValidationUtility } // 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
- bindurihelper.cs
- ProtocolsSection.cs
- HtmlHead.cs
- DependencyObjectType.cs
- ToolStripItemRenderEventArgs.cs
- XmlILIndex.cs
- XPathItem.cs
- Win32Exception.cs
- XmlValidatingReaderImpl.cs
- DispatcherEventArgs.cs
- VisualStyleInformation.cs
- AlignmentXValidation.cs
- HttpEncoder.cs
- shaper.cs
- Metafile.cs
- PropertyPathWorker.cs
- OdbcException.cs
- RegisteredExpandoAttribute.cs
- TextBox.cs
- XmlSchemaRedefine.cs
- DecoratedNameAttribute.cs
- Empty.cs
- ConfigUtil.cs
- RemotingConfiguration.cs
- DataGridViewRowCollection.cs
- CreateUserWizard.cs
- DoubleLinkListEnumerator.cs
- RegistrationServices.cs
- ActivationArguments.cs
- EventListenerClientSide.cs
- MainMenu.cs
- CodeBlockBuilder.cs
- EntityContainerEntitySet.cs
- compensatingcollection.cs
- PathFigure.cs
- IgnoreFileBuildProvider.cs
- RegexCode.cs
- MissingMethodException.cs
- MouseBinding.cs
- StoreContentChangedEventArgs.cs
- PropertyChangingEventArgs.cs
- DesignerLoader.cs
- TextTreeExtractElementUndoUnit.cs
- codemethodreferenceexpression.cs
- ServerValidateEventArgs.cs
- CultureInfoConverter.cs
- AssociationSetMetadata.cs
- SettingsPropertyIsReadOnlyException.cs
- BaseAppDomainProtocolHandler.cs
- WindowsFormsHost.cs
- EmptyCollection.cs
- ScriptingRoleServiceSection.cs
- DataSourceHelper.cs
- BrowserTree.cs
- SmtpNegotiateAuthenticationModule.cs
- RSAPKCS1SignatureDeformatter.cs
- DtrList.cs
- UnsafeNativeMethods.cs
- Section.cs
- DrawingContextDrawingContextWalker.cs
- RegexCharClass.cs
- SmtpReplyReaderFactory.cs
- BuildDependencySet.cs
- Converter.cs
- ProfileSection.cs
- WebRequestModuleElementCollection.cs
- RSAPKCS1SignatureDeformatter.cs
- SystemPens.cs
- RegexBoyerMoore.cs
- BitmapCodecInfoInternal.cs
- SecurityManager.cs
- SchemaLookupTable.cs
- RolePrincipal.cs
- IndentedTextWriter.cs
- ToolBar.cs
- FontFamilyIdentifier.cs
- XmlBinaryReader.cs
- JsonXmlDataContract.cs
- Point3DAnimationBase.cs
- ICspAsymmetricAlgorithm.cs
- ItemContainerProviderWrapper.cs
- MsmqHostedTransportConfiguration.cs
- MessageDecoder.cs
- XmlSiteMapProvider.cs
- DataGridViewBand.cs
- OleDbRowUpdatingEvent.cs
- ContainerVisual.cs
- HMACSHA256.cs
- PropertyValueChangedEvent.cs
- ChangePasswordDesigner.cs
- TextServicesDisplayAttribute.cs
- CaseInsensitiveOrdinalStringComparer.cs
- StreamUpgradeProvider.cs
- StatusBarItemAutomationPeer.cs
- ObjectDataSourceDisposingEventArgs.cs
- BufferedReadStream.cs
- TextEncodedRawTextWriter.cs
- BaseDataList.cs
- BitmapMetadata.cs
- Walker.cs