Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / DirectionalAction.cs / 1 / DirectionalAction.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { using System.ServiceModel; using System.ServiceModel.Description; using System.Collections.Generic; internal class DirectionalAction : IComparable{ MessageDirection direction; string action; bool isNullAction; internal DirectionalAction(MessageDirection direction, string action) { if (!MessageDirectionHelper.IsDefined(direction)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("direction")); this.direction = direction; if (action == null) { this.action = MessageHeaders.WildcardAction; this.isNullAction = true; } else { this.action = action; this.isNullAction = false; } } public MessageDirection Direction { get { return this.direction; } } public string Action { get { return this.isNullAction ? null : this.action; } } public override bool Equals(Object other) { DirectionalAction tmp = other as DirectionalAction; if (tmp == null) return false; return this.Equals(tmp); } public bool Equals(DirectionalAction other) { if (other == null) return false; return (this.direction == other.direction) && (this.action == other.action); } public int CompareTo(DirectionalAction other) { if (other == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("other"); if ((this.direction == MessageDirection.Input) && (other.direction == MessageDirection.Output)) return -1; if ((this.direction == MessageDirection.Output) && (other.direction == MessageDirection.Input)) return 1; return this.action.CompareTo(other.action); } public override int GetHashCode() { return this.action.GetHashCode(); } } } // 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
- TogglePatternIdentifiers.cs
- XmlHierarchyData.cs
- TransportBindingElementImporter.cs
- StreamResourceInfo.cs
- CharAnimationBase.cs
- SystemIcons.cs
- KeyMatchBuilder.cs
- DataRecordInternal.cs
- SessionStateItemCollection.cs
- SqlGenericUtil.cs
- PolygonHotSpot.cs
- HttpContext.cs
- TriggerAction.cs
- XmlnsDefinitionAttribute.cs
- ExpressionLexer.cs
- ZipIOLocalFileBlock.cs
- Brush.cs
- CircleHotSpot.cs
- MenuItemStyleCollection.cs
- HighContrastHelper.cs
- IndexOutOfRangeException.cs
- BitmapEffectOutputConnector.cs
- CallbackValidator.cs
- BitmapEffectOutputConnector.cs
- EntitySet.cs
- TemplateBindingExtensionConverter.cs
- StringFunctions.cs
- StatusStrip.cs
- Membership.cs
- XhtmlTextWriter.cs
- WSFederationHttpSecurity.cs
- DrawingBrush.cs
- TypeFieldSchema.cs
- ReadWriteObjectLock.cs
- FormViewCommandEventArgs.cs
- NameSpaceExtractor.cs
- MonthCalendar.cs
- ToolStripDropTargetManager.cs
- WindowsFormsEditorServiceHelper.cs
- ParseChildrenAsPropertiesAttribute.cs
- TimeSpanConverter.cs
- SynchronizationLockException.cs
- XamlTypeMapperSchemaContext.cs
- OrderingQueryOperator.cs
- externdll.cs
- ObjectToIdCache.cs
- Keyboard.cs
- PasswordTextNavigator.cs
- Tokenizer.cs
- MediaPlayer.cs
- FlatButtonAppearance.cs
- ControlCollection.cs
- XmlMapping.cs
- DesignerToolboxInfo.cs
- Stack.cs
- TextPenaltyModule.cs
- TextBoxAutomationPeer.cs
- ParentUndoUnit.cs
- Form.cs
- FileUpload.cs
- ScriptComponentDescriptor.cs
- Int32RectConverter.cs
- DependencyObjectType.cs
- OdbcParameter.cs
- StreamWriter.cs
- IProvider.cs
- RegistryConfigurationProvider.cs
- TraceRecord.cs
- ThemeDirectoryCompiler.cs
- MailMessage.cs
- Certificate.cs
- InputElement.cs
- RuntimeConfig.cs
- CharAnimationUsingKeyFrames.cs
- SecurityUtils.cs
- HtmlTextArea.cs
- DbDataRecord.cs
- DefaultMemberAttribute.cs
- SpecialFolderEnumConverter.cs
- Repeater.cs
- GCHandleCookieTable.cs
- CatalogPartDesigner.cs
- WorkflowInstanceAbortedRecord.cs
- StateManager.cs
- Point3DAnimationBase.cs
- RectangleF.cs
- AppearanceEditorPart.cs
- CompiledQuery.cs
- PathHelper.cs
- FileDialog.cs
- GlyphsSerializer.cs
- RestHandler.cs
- TypeSystem.cs
- QueryOperator.cs
- XmlAttribute.cs
- KeyManager.cs
- DataRecord.cs
- PrintDialogDesigner.cs
- ExceptionDetail.cs
- TabItemAutomationPeer.cs