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
- SmtpTransport.cs
- DBCommandBuilder.cs
- CryptoProvider.cs
- ActivationArguments.cs
- ObjectDataSourceSelectingEventArgs.cs
- SizeValueSerializer.cs
- InputChannelBinder.cs
- RealProxy.cs
- BindingEntityInfo.cs
- DelegatingChannelListener.cs
- XPathQueryGenerator.cs
- RequestNavigateEventArgs.cs
- SelectorItemAutomationPeer.cs
- StringValidatorAttribute.cs
- TypeReference.cs
- WebPartActionVerb.cs
- Matrix3D.cs
- WeakReference.cs
- ListItemParagraph.cs
- XmlSchemaComplexContentRestriction.cs
- DataGridViewButtonCell.cs
- Properties.cs
- DataGridViewComboBoxColumn.cs
- ParseHttpDate.cs
- Point3DAnimation.cs
- PreApplicationStartMethodAttribute.cs
- TextBlockAutomationPeer.cs
- SmiMetaData.cs
- SingleResultAttribute.cs
- figurelengthconverter.cs
- ControlBindingsCollection.cs
- ProgressBar.cs
- TypeUtils.cs
- PropertyHelper.cs
- precedingquery.cs
- PiiTraceSource.cs
- FontCollection.cs
- CopyOnWriteList.cs
- WebColorConverter.cs
- FigureHelper.cs
- ProcessHostFactoryHelper.cs
- ResourcePermissionBaseEntry.cs
- WorkflowInstanceTerminatedRecord.cs
- regiisutil.cs
- MdiWindowListItemConverter.cs
- RectangleConverter.cs
- InheritanceService.cs
- smtppermission.cs
- MessagePropertyDescriptionCollection.cs
- InkCanvasSelection.cs
- SystemIPInterfaceStatistics.cs
- ValueQuery.cs
- EmptyElement.cs
- ServicePoint.cs
- InteropBitmapSource.cs
- TargetInvocationException.cs
- DownloadProgressEventArgs.cs
- DbConnectionStringBuilder.cs
- MessageDispatch.cs
- InkPresenter.cs
- CompositeControl.cs
- HMAC.cs
- DiscoveryClientDocuments.cs
- Preprocessor.cs
- DataError.cs
- BrushMappingModeValidation.cs
- XmlSchemaSimpleType.cs
- HwndHost.cs
- MetadataArtifactLoaderFile.cs
- ByteStreamGeometryContext.cs
- XPathNavigator.cs
- ToolStripDesignerAvailabilityAttribute.cs
- ResourceDescriptionAttribute.cs
- PageAsyncTask.cs
- BuildProvider.cs
- Drawing.cs
- VerticalAlignConverter.cs
- HtmlProps.cs
- ObjectCloneHelper.cs
- FillErrorEventArgs.cs
- ClientRuntimeConfig.cs
- PropertyFilterAttribute.cs
- mactripleDES.cs
- columnmapfactory.cs
- BatchServiceHost.cs
- UrlAuthFailedErrorFormatter.cs
- MultipleViewPattern.cs
- FlowDocumentScrollViewer.cs
- SymbolType.cs
- EntityStoreSchemaGenerator.cs
- QilInvoke.cs
- WebPartCatalogAddVerb.cs
- ScrollItemProviderWrapper.cs
- SectionInput.cs
- sqlcontext.cs
- ActivitiesCollection.cs
- OleDbConnectionFactory.cs
- XmlTypeAttribute.cs
- XhtmlBasicSelectionListAdapter.cs
- IsolationInterop.cs