Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / CodeDOM / codemethodreferenceexpression.cs / 1 / codemethodreferenceexpression.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; using System.Runtime.Serialization; ////// [ ClassInterface(ClassInterfaceType.AutoDispatch), ComVisible(true), Serializable, ] public class CodeMethodReferenceExpression : CodeExpression { private CodeExpression targetObject; private string methodName; [OptionalField] private CodeTypeReferenceCollection typeArguments; ////// Represents an /// expression to invoke a method, to be called on a given target. /// ////// public CodeMethodReferenceExpression() { } ////// Initializes a new instance of ///. /// /// public CodeMethodReferenceExpression(CodeExpression targetObject, string methodName) { TargetObject = targetObject; MethodName = methodName; } public CodeMethodReferenceExpression(CodeExpression targetObject, string methodName, params CodeTypeReference[] typeParameters) { TargetObject = targetObject; MethodName = methodName; if( typeParameters != null && typeParameters.Length > 0) { TypeArguments.AddRange(typeParameters); } } ////// Initializes a new instance of ///using the specified /// target object and method name. /// /// public CodeExpression TargetObject { get { return targetObject; } set { this.targetObject = value; } } ////// Gets or sets the target object. /// ////// public string MethodName { get { return (methodName == null) ? string.Empty : methodName; } set { methodName = value; } } [System.Runtime.InteropServices.ComVisible(false)] public CodeTypeReferenceCollection TypeArguments{ get { if( typeArguments == null) { typeArguments = new CodeTypeReferenceCollection(); } return typeArguments; } } } }/// Gets or sets the name of the method to invoke. /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BindingManagerDataErrorEventArgs.cs
- _SecureChannel.cs
- DataServiceEntityAttribute.cs
- ValidatorCollection.cs
- TableStyle.cs
- Pens.cs
- MethodCallTranslator.cs
- DebugView.cs
- ExecutionContext.cs
- MergeFailedEvent.cs
- SoapSchemaImporter.cs
- CellParagraph.cs
- TwoPhaseCommit.cs
- GuidelineCollection.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- CollectionEditorDialog.cs
- VectorCollectionConverter.cs
- RichTextBoxAutomationPeer.cs
- DataPagerCommandEventArgs.cs
- Lease.cs
- GcSettings.cs
- AssemblyInfo.cs
- ParagraphResult.cs
- QilSortKey.cs
- QuaternionAnimationUsingKeyFrames.cs
- MetadataCache.cs
- ListCollectionView.cs
- CodeVariableReferenceExpression.cs
- InfoCardSymmetricCrypto.cs
- BoolExpression.cs
- ConnectorEditor.cs
- IdnMapping.cs
- StreamAsIStream.cs
- MethodBody.cs
- glyphs.cs
- ThreadStateException.cs
- MultipleViewPatternIdentifiers.cs
- TextEndOfLine.cs
- MenuBase.cs
- ValidationManager.cs
- PenThread.cs
- ConnectionManagementSection.cs
- HitTestDrawingContextWalker.cs
- EditorOptionAttribute.cs
- ImportContext.cs
- PackageFilter.cs
- ZipIOBlockManager.cs
- ReadOnlyDictionary.cs
- TreeBuilderBamlTranslator.cs
- __Filters.cs
- SqlProviderServices.cs
- WinInetCache.cs
- SessionStateUtil.cs
- StringResourceManager.cs
- ResourceSet.cs
- InvalidComObjectException.cs
- WindowsFormsSectionHandler.cs
- Slider.cs
- ValueQuery.cs
- TraceHandlerErrorFormatter.cs
- EtwTrace.cs
- HtmlElement.cs
- IItemContainerGenerator.cs
- Monitor.cs
- AmbientEnvironment.cs
- NumberFunctions.cs
- SelectionEditor.cs
- CellIdBoolean.cs
- XmlSchemaSet.cs
- ChannelManager.cs
- WebResourceUtil.cs
- Attributes.cs
- WebPartAddingEventArgs.cs
- CellQuery.cs
- SamlAction.cs
- XmlLanguageConverter.cs
- Registry.cs
- FormsAuthenticationEventArgs.cs
- EntityContainer.cs
- FileChangesMonitor.cs
- RepeatBehaviorConverter.cs
- SignatureHelper.cs
- XmlLangPropertyAttribute.cs
- DataGridColumnDropSeparator.cs
- HyperLinkStyle.cs
- TextPointerBase.cs
- StateDesigner.CommentLayoutGlyph.cs
- ChtmlTextWriter.cs
- DocobjHost.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ReplacementText.cs
- ViewDesigner.cs
- Maps.cs
- SapiRecoInterop.cs
- KeyboardDevice.cs
- Int32RectConverter.cs
- HashCryptoHandle.cs
- DotAtomReader.cs
- EndEvent.cs
- DataGridViewComboBoxEditingControl.cs