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
- ScriptDescriptor.cs
- XmlWellformedWriterHelpers.cs
- InkPresenter.cs
- UrlPath.cs
- OleDbPermission.cs
- WebAdminConfigurationHelper.cs
- AuthorizationContext.cs
- ConfigurationManagerHelper.cs
- SqlSelectClauseBuilder.cs
- WebBrowsableAttribute.cs
- PipelineModuleStepContainer.cs
- MsmqIntegrationMessageProperty.cs
- FixedSOMContainer.cs
- ListView.cs
- NumberFormatter.cs
- RandomNumberGenerator.cs
- TemplateColumn.cs
- MenuAutomationPeer.cs
- PreviewControlDesigner.cs
- SafeFileMappingHandle.cs
- SqlDependencyUtils.cs
- Dictionary.cs
- DataList.cs
- NumericUpDown.cs
- AxisAngleRotation3D.cs
- Stack.cs
- Crc32.cs
- Vector3DKeyFrameCollection.cs
- SqlClientPermission.cs
- ManualResetEvent.cs
- BufferedStream.cs
- DataObjectSettingDataEventArgs.cs
- XmlDocument.cs
- ParagraphResult.cs
- ToolStripComboBox.cs
- SrgsElement.cs
- DynamicILGenerator.cs
- BookmarkEventArgs.cs
- PartialCachingControl.cs
- MethodBody.cs
- PocoPropertyAccessorStrategy.cs
- CompilerParameters.cs
- FileDataSourceCache.cs
- CaseInsensitiveComparer.cs
- SqlXmlStorage.cs
- SchemaElementLookUpTableEnumerator.cs
- CodeParameterDeclarationExpressionCollection.cs
- TemplateBindingExtension.cs
- XmlWriter.cs
- XmlSchemaParticle.cs
- InfoCardConstants.cs
- GZipDecoder.cs
- DesignerAttribute.cs
- OleDbEnumerator.cs
- StrongName.cs
- FlowDecision.cs
- XsdValidatingReader.cs
- AssociationProvider.cs
- PhysicalFontFamily.cs
- TextElementCollectionHelper.cs
- Utils.cs
- MSG.cs
- SafeRegistryKey.cs
- odbcmetadatacolumnnames.cs
- SafeFileMappingHandle.cs
- SqlCacheDependencyDatabase.cs
- ActivitiesCollection.cs
- SetUserLanguageRequest.cs
- PersonalizationDictionary.cs
- ComplexObject.cs
- TypeUsageBuilder.cs
- HiddenField.cs
- Monitor.cs
- PeerNode.cs
- cookie.cs
- QueryStringHandler.cs
- CounterSample.cs
- ArrayConverter.cs
- HtmlInputSubmit.cs
- SqlGenericUtil.cs
- ProjectedSlot.cs
- SocketAddress.cs
- WebResourceAttribute.cs
- DataTableMapping.cs
- __Filters.cs
- DbExpressionBuilder.cs
- FutureFactory.cs
- URLMembershipCondition.cs
- EventLogPermissionEntry.cs
- PasswordBox.cs
- Compress.cs
- FormsIdentity.cs
- ModelServiceImpl.cs
- SqlBulkCopyColumnMappingCollection.cs
- RIPEMD160.cs
- StateRuntime.cs
- FloaterParagraph.cs
- TrackingDataItemValue.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- Soap12ServerProtocol.cs