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
- HtmlInputFile.cs
- SerializationAttributes.cs
- XomlCompilerError.cs
- ValueCollectionParameterReader.cs
- CodeAttributeDeclaration.cs
- InkSerializer.cs
- FormattedText.cs
- Delay.cs
- DispatcherObject.cs
- _UriSyntax.cs
- SponsorHelper.cs
- EdmError.cs
- SafeNativeMethods.cs
- TextRange.cs
- GeometryHitTestParameters.cs
- Scene3D.cs
- SiteMapNode.cs
- StylusPointPropertyInfoDefaults.cs
- MatchingStyle.cs
- CalendarBlackoutDatesCollection.cs
- ColumnTypeConverter.cs
- WorkflowInstanceSuspendedRecord.cs
- ApplyTemplatesAction.cs
- StylusLogic.cs
- RequestStatusBarUpdateEventArgs.cs
- SizeAnimationBase.cs
- WSSecureConversationFeb2005.cs
- WriteTimeStream.cs
- EntityContainerEmitter.cs
- Int64AnimationUsingKeyFrames.cs
- FullTextBreakpoint.cs
- MetricEntry.cs
- SecurityDescriptor.cs
- PerspectiveCamera.cs
- MemberRelationshipService.cs
- BackgroundWorker.cs
- CompilerHelpers.cs
- XmlTextWriter.cs
- XMLUtil.cs
- ImageSource.cs
- ProfileSettingsCollection.cs
- sapiproxy.cs
- CfgSemanticTag.cs
- SchemaHelper.cs
- RunWorkerCompletedEventArgs.cs
- FocusChangedEventArgs.cs
- MailDefinition.cs
- ParamArrayAttribute.cs
- MatrixTransform3D.cs
- pingexception.cs
- BaseValidatorDesigner.cs
- CommandDevice.cs
- DictionaryContent.cs
- HttpApplication.cs
- UnorderedHashRepartitionStream.cs
- PathSegment.cs
- MdiWindowListStrip.cs
- AvTrace.cs
- Win32SafeHandles.cs
- PartialTrustHelpers.cs
- ProfileParameter.cs
- FileDetails.cs
- UInt32.cs
- PropertyEntry.cs
- SafeRightsManagementPubHandle.cs
- CopyNodeSetAction.cs
- StructuredTypeInfo.cs
- TaiwanCalendar.cs
- HtmlHead.cs
- SQLInt32.cs
- FormsAuthenticationCredentials.cs
- StateMachineWorkflowInstance.cs
- Point3DAnimation.cs
- MobileControlsSectionHelper.cs
- BitStream.cs
- DeadLetterQueue.cs
- OdbcConnectionStringbuilder.cs
- DefaultAssemblyResolver.cs
- ConnectionProviderAttribute.cs
- PageTheme.cs
- XmlDownloadManager.cs
- WebPartDescription.cs
- Error.cs
- NameTable.cs
- COMException.cs
- BinaryObjectWriter.cs
- PolicyStatement.cs
- Int32Animation.cs
- MappingMetadataHelper.cs
- ReservationCollection.cs
- ProtocolsConfigurationEntry.cs
- TimelineGroup.cs
- ActivityDesigner.cs
- MsmqIntegrationChannelListener.cs
- XamlTreeBuilder.cs
- ResXBuildProvider.cs
- ProfileGroupSettings.cs
- CustomAssemblyResolver.cs
- Single.cs
- activationcontext.cs