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
- NetCodeGroup.cs
- TabControlToolboxItem.cs
- BaseTreeIterator.cs
- MatchAttribute.cs
- SelectedDatesCollection.cs
- DefaultExpression.cs
- ToggleButton.cs
- SqlClientWrapperSmiStreamChars.cs
- WebPartActionVerb.cs
- DataTablePropertyDescriptor.cs
- XmlSerializationGeneratedCode.cs
- Parser.cs
- SwitchElementsCollection.cs
- RoleManagerSection.cs
- ComboBox.cs
- Executor.cs
- AccessViolationException.cs
- SharedRuntimeState.cs
- SessionSwitchEventArgs.cs
- Hash.cs
- XamlStream.cs
- DetailsViewRowCollection.cs
- XpsResource.cs
- EventListener.cs
- UIHelper.cs
- OutputCacheSettings.cs
- HtmlTernaryTree.cs
- StringResourceManager.cs
- StyleXamlParser.cs
- InputScopeAttribute.cs
- ArraySubsetEnumerator.cs
- ModuleConfigurationInfo.cs
- PerformanceCounterManager.cs
- SudsCommon.cs
- MaskedTextBoxDesignerActionList.cs
- FileSystemInfo.cs
- DataPointer.cs
- CacheMode.cs
- TypeSchema.cs
- EasingFunctionBase.cs
- BindToObject.cs
- WindowsSlider.cs
- DeclaredTypeValidator.cs
- ProvideValueServiceProvider.cs
- ScriptReference.cs
- TextRangeAdaptor.cs
- FormViewInsertedEventArgs.cs
- StatusBarDrawItemEvent.cs
- CompoundFileIOPermission.cs
- SystemIPInterfaceProperties.cs
- UnsafeNativeMethods.cs
- Int16KeyFrameCollection.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- SQLMoney.cs
- MetadataWorkspace.cs
- WinEventHandler.cs
- TextTreeInsertUndoUnit.cs
- OrderByQueryOptionExpression.cs
- DropShadowEffect.cs
- DecimalAnimationUsingKeyFrames.cs
- ReadOnlyDataSourceView.cs
- CryptoHelper.cs
- GeneralTransform.cs
- ProxyGenerator.cs
- util.cs
- HttpGetProtocolImporter.cs
- Int64AnimationUsingKeyFrames.cs
- LogLogRecordEnumerator.cs
- WebPartDisplayModeCollection.cs
- InternalConfigRoot.cs
- DataGridViewRowEventArgs.cs
- FontConverter.cs
- Avt.cs
- _TimerThread.cs
- ChildTable.cs
- AlternateView.cs
- CachedPathData.cs
- SettingsAttributes.cs
- HttpCacheParams.cs
- SettingsAttributes.cs
- Animatable.cs
- WorkflowDefinitionContext.cs
- DefaultSection.cs
- DataListItemCollection.cs
- GeneralTransform.cs
- WriteableBitmap.cs
- TextEditorContextMenu.cs
- ValidatorCompatibilityHelper.cs
- AnnotationResourceChangedEventArgs.cs
- SemaphoreSecurity.cs
- Stack.cs
- MemoryStream.cs
- EncoderFallback.cs
- ThreadStateException.cs
- IndicFontClient.cs
- CancellationScope.cs
- DrawingAttributesDefaultValueFactory.cs
- OutputWindow.cs
- HebrewNumber.cs
- SqlBuffer.cs