Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / CodeDOM / CodeAttachEventStatement.cs / 1 / CodeAttachEventStatement.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
///
///
/// Represents a event attach statement.
///
///
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeAttachEventStatement : CodeStatement {
private CodeEventReferenceExpression eventRef;
private CodeExpression listener;
///
///
/// Initializes a new instance of .
///
///
public CodeAttachEventStatement() {
}
///
///
/// Initializes a new instance of the class using the specified arguments.
///
///
public CodeAttachEventStatement(CodeEventReferenceExpression eventRef, CodeExpression listener) {
this.eventRef = eventRef;
this.listener = listener;
}
///
/// [To be supplied.]
///
public CodeAttachEventStatement(CodeExpression targetObject, string eventName, CodeExpression listener) {
this.eventRef = new CodeEventReferenceExpression(targetObject, eventName);
this.listener = listener;
}
///
///
/// The event to attach a listener to.
///
///
public CodeEventReferenceExpression Event {
get {
if (eventRef == null) {
return new CodeEventReferenceExpression();
}
return eventRef;
}
set {
eventRef = value;
}
}
///
///
/// The new listener.
///
///
public CodeExpression Listener {
get {
return listener;
}
set {
listener = value;
}
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NullableBoolConverter.cs
- TextEditorSelection.cs
- returneventsaver.cs
- UserControl.cs
- DefaultWorkflowSchedulerService.cs
- MemberInfoSerializationHolder.cs
- ConnectionsZone.cs
- ParserHooks.cs
- LayoutEvent.cs
- Boolean.cs
- WindowsIPAddress.cs
- ObjectViewFactory.cs
- SecurityPermission.cs
- ObfuscationAttribute.cs
- PropertyHelper.cs
- SystemMulticastIPAddressInformation.cs
- SiblingIterators.cs
- Annotation.cs
- LinkedResource.cs
- ConnectionInterfaceCollection.cs
- LazyTextWriterCreator.cs
- SchemaElement.cs
- SystemTcpStatistics.cs
- InfoCardClaim.cs
- NameSpaceExtractor.cs
- RequestCachingSection.cs
- WindowsGraphicsWrapper.cs
- CodeCompileUnit.cs
- SemaphoreSlim.cs
- HttpWebResponse.cs
- XmlDocumentSerializer.cs
- RegisterInfo.cs
- CompressedStack.cs
- WindowsListViewItemStartMenu.cs
- ScrollChangedEventArgs.cs
- ReferentialConstraintRoleElement.cs
- HttpListenerTimeoutManager.cs
- counter.cs
- CounterSample.cs
- UInt64Converter.cs
- BinaryObjectWriter.cs
- CharAnimationUsingKeyFrames.cs
- TypeDescriptionProvider.cs
- FormViewDeletedEventArgs.cs
- Rotation3DKeyFrameCollection.cs
- SafeRightsManagementQueryHandle.cs
- SqlClientMetaDataCollectionNames.cs
- DateTimeConverter2.cs
- ExpressionConverter.cs
- HashRepartitionStream.cs
- SimpleType.cs
- _AutoWebProxyScriptWrapper.cs
- InstanceOwnerQueryResult.cs
- Membership.cs
- ListParaClient.cs
- BoundField.cs
- CodeStatement.cs
- VectorCollection.cs
- BrowserCapabilitiesFactory35.cs
- BuildManagerHost.cs
- PeerContact.cs
- VisualSerializer.cs
- XmlCharCheckingReader.cs
- DSACryptoServiceProvider.cs
- FormViewRow.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- ConstraintConverter.cs
- MembershipUser.cs
- WebPartDisplayModeCancelEventArgs.cs
- PathFigureCollectionConverter.cs
- ViewManager.cs
- ManagementOptions.cs
- FixedSOMImage.cs
- Focus.cs
- Camera.cs
- Helpers.cs
- BindingsSection.cs
- SecurityUtils.cs
- FullTextState.cs
- TimeStampChecker.cs
- LoginUtil.cs
- TypeConverterAttribute.cs
- ControlIdConverter.cs
- InkSerializer.cs
- SafeThreadHandle.cs
- PageContent.cs
- XmlNode.cs
- COM2ICategorizePropertiesHandler.cs
- NullableFloatMinMaxAggregationOperator.cs
- ContentElement.cs
- WebPartEditorApplyVerb.cs
- IndexOutOfRangeException.cs
- Setter.cs
- RoleManagerEventArgs.cs
- MissingMethodException.cs
- ComponentDispatcher.cs
- SerializationHelper.cs
- TextUtf8RawTextWriter.cs
- DbProviderServices.cs
- TargetConverter.cs