Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- HandleCollector.cs
- FlowDocumentReaderAutomationPeer.cs
- TerminatingOperationBehavior.cs
- FunctionNode.cs
- DataGridViewColumnStateChangedEventArgs.cs
- ScrollChrome.cs
- EntityAdapter.cs
- DesignSurfaceCollection.cs
- ManualResetEvent.cs
- TextEditorLists.cs
- ReaderWriterLock.cs
- SamlAssertionDirectKeyIdentifierClause.cs
- HtmlHistory.cs
- Floater.cs
- StringFormat.cs
- CompilerTypeWithParams.cs
- TaiwanCalendar.cs
- Literal.cs
- NativeMethods.cs
- RegisteredArrayDeclaration.cs
- TableParaClient.cs
- RootBuilder.cs
- ExceptionRoutedEventArgs.cs
- HtmlControl.cs
- InternalSendMessage.cs
- Vector.cs
- SectionVisual.cs
- SqlInfoMessageEvent.cs
- XmlSchemaSequence.cs
- RepeatButton.cs
- HeaderedItemsControl.cs
- DataTableReaderListener.cs
- VisualStyleRenderer.cs
- VariableQuery.cs
- ServiceMemoryGates.cs
- SynchronizationFilter.cs
- ElementAction.cs
- Registry.cs
- TabControlAutomationPeer.cs
- CodeAccessPermission.cs
- CompositeScriptReference.cs
- ImageListStreamer.cs
- Grid.cs
- DataObjectSettingDataEventArgs.cs
- InputGestureCollection.cs
- AddIn.cs
- _TimerThread.cs
- BaseTemplateBuildProvider.cs
- UncommonField.cs
- AnnouncementSendsAsyncResult.cs
- sqlser.cs
- ContractUtils.cs
- MatcherBuilder.cs
- WindowsToolbarAsMenu.cs
- NullExtension.cs
- DurationConverter.cs
- WebPartDisplayModeCollection.cs
- VisualStates.cs
- TypeDelegator.cs
- OdbcUtils.cs
- ChildrenQuery.cs
- FillRuleValidation.cs
- XmlSchemaObjectCollection.cs
- METAHEADER.cs
- TextureBrush.cs
- VariableQuery.cs
- _ShellExpression.cs
- StaticFileHandler.cs
- GeometryModel3D.cs
- WebPartMenuStyle.cs
- DocumentPageView.cs
- MenuItemBinding.cs
- TheQuery.cs
- PerformanceCounterManager.cs
- SqlDataSourceCache.cs
- CreateUserWizard.cs
- NotifyCollectionChangedEventArgs.cs
- ResXBuildProvider.cs
- ActivationArguments.cs
- Message.cs
- TextDecorationLocationValidation.cs
- PackagingUtilities.cs
- Marshal.cs
- CurrencyWrapper.cs
- XmlDocumentFieldSchema.cs
- Effect.cs
- ColorTranslator.cs
- SystemIcons.cs
- RotateTransform3D.cs
- UnknownBitmapEncoder.cs
- ManualWorkflowSchedulerService.cs
- CodeIterationStatement.cs
- TraceLog.cs
- WindowsComboBox.cs
- WpfSharedXamlSchemaContext.cs
- Image.cs
- SectionVisual.cs
- TextBoxBase.cs
- ObjectStorage.cs
- UnsafeNativeMethods.cs