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
- NotifyIcon.cs
- ApplicationInfo.cs
- StaticExtension.cs
- NullableFloatAverageAggregationOperator.cs
- oledbmetadatacolumnnames.cs
- BitmapEffectDrawingContent.cs
- CollectionBase.cs
- CodeGroup.cs
- Page.cs
- ListChunk.cs
- WorkflowViewManager.cs
- LinqDataSourceInsertEventArgs.cs
- PackWebRequest.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- Parser.cs
- SpellerStatusTable.cs
- SupportingTokenParameters.cs
- EventMemberCodeDomSerializer.cs
- TableStyle.cs
- ProviderUtil.cs
- ConcurrentDictionary.cs
- StylesEditorDialog.cs
- LookupBindingPropertiesAttribute.cs
- CheckableControlBaseAdapter.cs
- PeerNearMe.cs
- CalendarTable.cs
- CatalogPartDesigner.cs
- ToolBarTray.cs
- WebEncodingValidator.cs
- EncoderParameter.cs
- _KerberosClient.cs
- HtmlInputReset.cs
- TableLayoutPanel.cs
- ObjectQuery.cs
- AttributeUsageAttribute.cs
- Help.cs
- TagMapCollection.cs
- FixedSOMLineCollection.cs
- CodeConstructor.cs
- TCPListener.cs
- GenericUriParser.cs
- UInt64Storage.cs
- UIElement.cs
- CodeCastExpression.cs
- DataTableCollection.cs
- IntMinMaxAggregationOperator.cs
- UTF32Encoding.cs
- DataGridBoolColumn.cs
- IteratorFilter.cs
- ActivityExecutionContext.cs
- DataPagerField.cs
- FixedLineResult.cs
- FrameworkElement.cs
- NGCSerializerAsync.cs
- TextServicesPropertyRanges.cs
- ExpandCollapsePattern.cs
- RunWorkerCompletedEventArgs.cs
- Select.cs
- CompareValidator.cs
- SafeBitVector32.cs
- FormViewPageEventArgs.cs
- SystemResourceHost.cs
- SHA512Managed.cs
- Automation.cs
- Int32AnimationUsingKeyFrames.cs
- EntityClassGenerator.cs
- SecurityPermission.cs
- CodeAttributeDeclaration.cs
- Composition.cs
- EdmProviderManifest.cs
- NullReferenceException.cs
- PointAnimationBase.cs
- FactoryGenerator.cs
- WorkerRequest.cs
- DBSchemaRow.cs
- ContentElement.cs
- BehaviorEditorPart.cs
- NaturalLanguageHyphenator.cs
- NodeInfo.cs
- ToolStripLabel.cs
- ItemAutomationPeer.cs
- TagMapInfo.cs
- TextBox.cs
- RefreshPropertiesAttribute.cs
- PlatformCulture.cs
- ManualWorkflowSchedulerService.cs
- BitmapEffectvisualstate.cs
- KeyProperty.cs
- HandoffBehavior.cs
- RijndaelCryptoServiceProvider.cs
- FamilyCollection.cs
- ServiceKnownTypeAttribute.cs
- Accessible.cs
- ProtocolImporter.cs
- FigureParaClient.cs
- _AutoWebProxyScriptWrapper.cs
- XmlSerializationWriter.cs
- PersonalizationEntry.cs
- JsonWriterDelegator.cs
- TypeConverterHelper.cs