Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// 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;
}
}
}
}
// 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
- LocalBuilder.cs
- PageTheme.cs
- XmlSchemaImport.cs
- ToolTipService.cs
- MarkupCompilePass1.cs
- ListItem.cs
- RuleSettings.cs
- FormatStringEditor.cs
- ClickablePoint.cs
- SessionSwitchEventArgs.cs
- ChildTable.cs
- HttpModuleAction.cs
- ZipIOFileItemStream.cs
- UiaCoreProviderApi.cs
- AuditLogLocation.cs
- TiffBitmapDecoder.cs
- UnmanagedHandle.cs
- WebPartActionVerb.cs
- EntityRecordInfo.cs
- UxThemeWrapper.cs
- DrawTreeNodeEventArgs.cs
- ServerValidateEventArgs.cs
- TraceData.cs
- SafeArrayTypeMismatchException.cs
- UpdatePanel.cs
- Matrix3D.cs
- IImplicitResourceProvider.cs
- TextDecorationCollectionConverter.cs
- RecipientIdentity.cs
- ParameterDataSourceExpression.cs
- HostedTcpTransportManager.cs
- BitmapScalingModeValidation.cs
- TextCompositionManager.cs
- AnnotationMap.cs
- Thumb.cs
- StartUpEventArgs.cs
- Profiler.cs
- UIAgentInitializationException.cs
- HandlerFactoryCache.cs
- _AuthenticationState.cs
- _ListenerRequestStream.cs
- _SslStream.cs
- Rotation3DKeyFrameCollection.cs
- OdbcStatementHandle.cs
- CommandDesigner.cs
- DeclarativeCatalogPart.cs
- DecimalAnimationBase.cs
- CellNormalizer.cs
- CatalogPartChrome.cs
- TextEditorCharacters.cs
- TextLineBreak.cs
- DrawToolTipEventArgs.cs
- ExtensibleClassFactory.cs
- WebPartDisplayModeEventArgs.cs
- Annotation.cs
- ContextMenuService.cs
- SafeProcessHandle.cs
- ExtensionWindowHeader.cs
- ArrayListCollectionBase.cs
- ToolStripDropDownMenu.cs
- TdsParser.cs
- DesignOnlyAttribute.cs
- MemberNameValidator.cs
- XmlSchemaExporter.cs
- CultureSpecificStringDictionary.cs
- RedistVersionInfo.cs
- XamlVector3DCollectionSerializer.cs
- MsmqProcessProtocolHandler.cs
- AspNetCompatibilityRequirementsAttribute.cs
- SqlRemoveConstantOrderBy.cs
- Rect3DValueSerializer.cs
- MILUtilities.cs
- ChannelListenerBase.cs
- storepermissionattribute.cs
- DataGridViewDataConnection.cs
- ParseHttpDate.cs
- RelationshipType.cs
- SizeAnimation.cs
- CultureInfoConverter.cs
- ParallelDesigner.cs
- AbstractSvcMapFileLoader.cs
- OdbcConnectionString.cs
- IPPacketInformation.cs
- HttpRawResponse.cs
- _AutoWebProxyScriptEngine.cs
- RegexCharClass.cs
- HttpCacheVaryByContentEncodings.cs
- WebBaseEventKeyComparer.cs
- Style.cs
- AnnotationResource.cs
- StrongNamePublicKeyBlob.cs
- OdbcCommandBuilder.cs
- ConfigXmlCDataSection.cs
- IndexOutOfRangeException.cs
- PeerApplication.cs
- SamlAuthorizationDecisionClaimResource.cs
- LineGeometry.cs
- SqlDataSourceFilteringEventArgs.cs
- Contracts.cs
- NotConverter.cs