Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Messaging / System / Messaging / ReceiveCompletedEventArgs.cs / 1305376 / ReceiveCompletedEventArgs.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Messaging {
using System.Diagnostics;
using System;
///
///
/// Provides data for the
/// event.
///
public class ReceiveCompletedEventArgs : EventArgs {
private IAsyncResult result;
private Message message;
private MessageQueue sender;
///
///
internal ReceiveCompletedEventArgs(MessageQueue sender, IAsyncResult result) {
this.result = result;
this.sender = sender;
}
///
///
/// Contains the result of the asynchronous
/// operation requested.
///
public IAsyncResult AsyncResult {
get {
return this.result;
}
set {
this.result = value;
}
}
///
///
/// The end result of the posted asynchronous receive
/// operation.
///
public Message Message {
get {
if (this.message == null) {
try {
this.message = this.sender.EndReceive(result);
}
catch {
throw;
}
}
return this.message;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Messaging {
using System.Diagnostics;
using System;
///
///
/// Provides data for the
/// event.
///
public class ReceiveCompletedEventArgs : EventArgs {
private IAsyncResult result;
private Message message;
private MessageQueue sender;
///
///
internal ReceiveCompletedEventArgs(MessageQueue sender, IAsyncResult result) {
this.result = result;
this.sender = sender;
}
///
///
/// Contains the result of the asynchronous
/// operation requested.
///
public IAsyncResult AsyncResult {
get {
return this.result;
}
set {
this.result = value;
}
}
///
///
/// The end result of the posted asynchronous receive
/// operation.
///
public Message Message {
get {
if (this.message == null) {
try {
this.message = this.sender.EndReceive(result);
}
catch {
throw;
}
}
return this.message;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BooleanExpr.cs
- PrintDocument.cs
- FlagsAttribute.cs
- Assembly.cs
- TagNameToTypeMapper.cs
- DbParameterHelper.cs
- DecimalAnimationBase.cs
- RightNameExpirationInfoPair.cs
- EdmError.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- RelationshipEndCollection.cs
- RegisteredHiddenField.cs
- PathFigure.cs
- KeyValuePairs.cs
- XmlSchemaSet.cs
- InvalidDataException.cs
- WpfKnownMemberInvoker.cs
- TraversalRequest.cs
- Parser.cs
- XmlEncodedRawTextWriter.cs
- DataGridView.cs
- ZipIOLocalFileBlock.cs
- XmlJsonWriter.cs
- OrderedDictionary.cs
- TransformerConfigurationWizardBase.cs
- HierarchicalDataTemplate.cs
- PathSegment.cs
- XmlFormatWriterGenerator.cs
- CodeExporter.cs
- TrustLevel.cs
- XsdDuration.cs
- CodeSnippetTypeMember.cs
- PrintDialog.cs
- FamilyTypeface.cs
- BitmapCache.cs
- log.cs
- AuthenticateEventArgs.cs
- ParenthesizePropertyNameAttribute.cs
- ConnectionOrientedTransportManager.cs
- CallbackValidatorAttribute.cs
- InputLanguageCollection.cs
- XmlSchemaInfo.cs
- MembershipSection.cs
- BaseHashHelper.cs
- SpeakProgressEventArgs.cs
- ZoneLinkButton.cs
- PropertyGridEditorPart.cs
- AsymmetricSignatureDeformatter.cs
- ChtmlTextWriter.cs
- StateMachine.cs
- ObjectConverter.cs
- ScriptResourceInfo.cs
- DataGridViewAdvancedBorderStyle.cs
- SchemaImporterExtension.cs
- MsmqIntegrationInputChannel.cs
- EntityDataSourceWrapper.cs
- Graphics.cs
- COAUTHINFO.cs
- UIElement3D.cs
- COM2IDispatchConverter.cs
- SharedConnectionInfo.cs
- ArrayExtension.cs
- RuntimeEnvironment.cs
- ParserExtension.cs
- AppDomainAttributes.cs
- CompensateDesigner.cs
- StringValidator.cs
- UnitySerializationHolder.cs
- SHA256Managed.cs
- FixedSOMLineCollection.cs
- RequestCachingSection.cs
- BrowserInteropHelper.cs
- ExpressionBinding.cs
- HttpListener.cs
- ColorConverter.cs
- CodeDelegateCreateExpression.cs
- CharacterShapingProperties.cs
- RoutedEvent.cs
- unsafenativemethodstextservices.cs
- FtpWebRequest.cs
- CultureSpecificStringDictionary.cs
- EmbeddedMailObjectCollectionEditor.cs
- OleDbErrorCollection.cs
- Normalization.cs
- FixedStringLookup.cs
- EventEntry.cs
- EntityProxyTypeInfo.cs
- CompositeControl.cs
- MetadataPropertyCollection.cs
- BitmapEffectRenderDataResource.cs
- GeometryConverter.cs
- ObjectSecurity.cs
- Int16AnimationBase.cs
- ClientEndpointLoader.cs
- MessageFilter.cs
- RecognizedPhrase.cs
- GlobalizationAssembly.cs
- CounterCreationDataCollection.cs
- ZeroOpNode.cs
- Converter.cs