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
- FileRecordSequenceCompletedAsyncResult.cs
- FolderBrowserDialog.cs
- TemplatedWizardStep.cs
- InkSerializer.cs
- GridViewCancelEditEventArgs.cs
- DecoderExceptionFallback.cs
- SafeFileMappingHandle.cs
- HyperLinkColumn.cs
- URL.cs
- WindowsFormsSectionHandler.cs
- ProtocolsSection.cs
- ApplicationSecurityManager.cs
- SimpleHandlerBuildProvider.cs
- QueryCacheManager.cs
- ChainedAsyncResult.cs
- TemplateGroupCollection.cs
- SqlDataSourceEnumerator.cs
- Timer.cs
- CommandBindingCollection.cs
- RowType.cs
- UnsafeNativeMethodsPenimc.cs
- DbConnectionPool.cs
- SqlDataSourceCache.cs
- WebRequestModuleElementCollection.cs
- SoapSchemaImporter.cs
- FlagsAttribute.cs
- SqlRewriteScalarSubqueries.cs
- Matrix3DValueSerializer.cs
- AutomationIdentifier.cs
- CodeRegionDirective.cs
- WebPartUtil.cs
- ProviderBase.cs
- OleDbDataReader.cs
- SchemaCollectionCompiler.cs
- RulePatternOps.cs
- MenuItem.cs
- Opcode.cs
- ISAPIRuntime.cs
- IDQuery.cs
- DecoderFallback.cs
- CornerRadius.cs
- KoreanLunisolarCalendar.cs
- SortKey.cs
- SessionSwitchEventArgs.cs
- StringDictionaryWithComparer.cs
- AttributeQuery.cs
- CompositeFontParser.cs
- Model3D.cs
- ColorConverter.cs
- DataSvcMapFile.cs
- TextTreeNode.cs
- RemotingAttributes.cs
- JsonDeserializer.cs
- ScriptMethodAttribute.cs
- KnownTypeDataContractResolver.cs
- StorageEntityContainerMapping.cs
- SqlTypeSystemProvider.cs
- Msec.cs
- Selector.cs
- Menu.cs
- RenamedEventArgs.cs
- DbConnectionPoolCounters.cs
- TextDecorationCollectionConverter.cs
- MyContact.cs
- DataGridViewCellEventArgs.cs
- BrushMappingModeValidation.cs
- WebSysDefaultValueAttribute.cs
- KeyInstance.cs
- ContentPlaceHolder.cs
- ResourceDefaultValueAttribute.cs
- PolicyException.cs
- GenericParameterDataContract.cs
- MenuItem.cs
- PiiTraceSource.cs
- ServiceElementCollection.cs
- LayoutEditorPart.cs
- StandardRuntimeEnumValidatorAttribute.cs
- TripleDESCryptoServiceProvider.cs
- InstanceStoreQueryResult.cs
- Listbox.cs
- RsaSecurityToken.cs
- GridViewDeleteEventArgs.cs
- FileAccessException.cs
- XPathConvert.cs
- ResourceIDHelper.cs
- Roles.cs
- SimplePropertyEntry.cs
- OdbcErrorCollection.cs
- BasicCommandTreeVisitor.cs
- SecurityTokenRequirement.cs
- DecoderExceptionFallback.cs
- UpWmlPageAdapter.cs
- Encoder.cs
- _ListenerAsyncResult.cs
- SqlSupersetValidator.cs
- AssociativeAggregationOperator.cs
- EmptyEnumerator.cs
- SqlClientWrapperSmiStream.cs
- RectIndependentAnimationStorage.cs
- ApplicationServicesHostFactory.cs