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
- XmlIlGenerator.cs
- FixedSOMFixedBlock.cs
- X509Utils.cs
- ClientSponsor.cs
- COM2TypeInfoProcessor.cs
- FixedSOMElement.cs
- ItemType.cs
- NameNode.cs
- AccessibilityHelperForVista.cs
- LifetimeServices.cs
- XmlWrappingReader.cs
- InstallerTypeAttribute.cs
- Viewport3DAutomationPeer.cs
- unsafenativemethodstextservices.cs
- SafeNativeMethods.cs
- ResourceReferenceKeyNotFoundException.cs
- NotifyIcon.cs
- configsystem.cs
- SemanticKeyElement.cs
- RuntimeCompatibilityAttribute.cs
- DataGridViewSelectedColumnCollection.cs
- TreeNodeStyleCollection.cs
- RepeatBehavior.cs
- ScrollData.cs
- ReadWriteObjectLock.cs
- indexingfiltermarshaler.cs
- WorkerRequest.cs
- FormsAuthentication.cs
- DataExpression.cs
- DiscoveryCallbackBehavior.cs
- AddIn.cs
- NamedPermissionSet.cs
- PolicyLevel.cs
- MimeMapping.cs
- CheckBoxPopupAdapter.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- CommandID.cs
- CallbackValidator.cs
- InfoCardKeyedHashAlgorithm.cs
- UnsignedPublishLicense.cs
- RegistrySecurity.cs
- DefaultBinder.cs
- CodeSubDirectory.cs
- OpenTypeCommon.cs
- Geometry3D.cs
- MetadataUtil.cs
- ValidatorAttribute.cs
- MessageAction.cs
- WmlControlAdapter.cs
- BindingMAnagerBase.cs
- PageParserFilter.cs
- IsolatedStorageFileStream.cs
- X509CertificateCollection.cs
- CodeActivityMetadata.cs
- PrintPageEvent.cs
- StaticResourceExtension.cs
- CharStorage.cs
- As.cs
- InsufficientMemoryException.cs
- BatchWriter.cs
- MarginCollapsingState.cs
- EpmCustomContentDeSerializer.cs
- ReversePositionQuery.cs
- QuotedPrintableStream.cs
- OutputCache.cs
- ObjectTag.cs
- ScalarOps.cs
- DataPagerFieldItem.cs
- DelegatingTypeDescriptionProvider.cs
- IconBitmapDecoder.cs
- OptimizerPatterns.cs
- MessageDirection.cs
- AmbientValueAttribute.cs
- SmtpFailedRecipientException.cs
- WsdlInspector.cs
- QilXmlWriter.cs
- PersistenceContextEnlistment.cs
- XmlDocumentFragment.cs
- HttpProcessUtility.cs
- GridView.cs
- WindowsUpDown.cs
- BCLDebug.cs
- TableDetailsRow.cs
- DeferredTextReference.cs
- BinaryFormatter.cs
- TemplateNameScope.cs
- XmlSchemaAll.cs
- TabItem.cs
- ObjectListShowCommandsEventArgs.cs
- MachineSettingsSection.cs
- XPathSingletonIterator.cs
- HTMLTextWriter.cs
- EmitterCache.cs
- FixedHyperLink.cs
- AutoCompleteStringCollection.cs
- BaseTreeIterator.cs
- GroupItem.cs
- DataControlImageButton.cs
- Accessible.cs
- SiblingIterators.cs