Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / Microsoft / Scripting / Actions / CallSiteHelpers.cs / 1305376 / CallSiteHelpers.cs
/* **************************************************************************** * * Copyright (c) Microsoft Corporation. * * This source code is subject to terms and conditions of the Microsoft Public License. A * copy of the license can be found in the License.html file at the root of this distribution. If * you cannot locate the Microsoft Public License, please send an email to * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound * by the terms of the Microsoft Public License. * * You must not remove this notice, or any other, from this software. * * * ***************************************************************************/ using System.Reflection; namespace System.Runtime.CompilerServices { ////// Class that contains helper methods for DLR CallSites. /// public static class CallSiteHelpers { private static Type _knownNonDynamicMethodType = typeof(object).GetMethod("ToString").GetType(); ////// Checks if a /// The inputis internally used by DLR and should not /// be displayed on the language code's stack. /// /// /// True if the input [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] public static bool IsInternalFrame(MethodBase mb) { //All the dynamic methods created for DLR rules have a special name. //We also check if the method has a different type than the known //non-static method. If it does, it is a dynamic method. //This could be improved if the CLR provides a way to attach some information //to the dynamic method we create, like CustomAttributes. if (mb.Name == "CallSite.Target" && mb.GetType() != _knownNonDynamicMethodType) { return true; } //Filter out the helper methods. if (mb.DeclaringType == typeof(System.Dynamic.UpdateDelegates)) { return true; } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.is internally used by DLR and should not /// be displayed on the language code's stack. Otherwise, false. ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StatusBarAutomationPeer.cs
- RadioButton.cs
- ColorMap.cs
- HttpWebRequest.cs
- securitycriticaldata.cs
- TextModifierScope.cs
- TextTreeRootNode.cs
- WCFBuildProvider.cs
- loginstatus.cs
- DataMemberAttribute.cs
- Propagator.JoinPropagator.cs
- EdmSchemaError.cs
- Encoding.cs
- LicenseManager.cs
- Compress.cs
- OleDbInfoMessageEvent.cs
- Stylesheet.cs
- NTAccount.cs
- DomainLiteralReader.cs
- MultipleViewProviderWrapper.cs
- ProcessInfo.cs
- BindingCompleteEventArgs.cs
- WebPartAddingEventArgs.cs
- TypeElement.cs
- ConfigurationCollectionAttribute.cs
- SmtpNtlmAuthenticationModule.cs
- BoolExpression.cs
- _Rfc2616CacheValidators.cs
- Stack.cs
- ModifiableIteratorCollection.cs
- ControlsConfig.cs
- ObjectTag.cs
- CommonGetThemePartSize.cs
- FileUtil.cs
- PartialTrustVisibleAssemblyCollection.cs
- XPathParser.cs
- RequestCachingSection.cs
- Dispatcher.cs
- safelink.cs
- SafeNativeMethodsMilCoreApi.cs
- EdgeProfileValidation.cs
- SelectionItemProviderWrapper.cs
- CapabilitiesPattern.cs
- HiddenFieldDesigner.cs
- tooltip.cs
- ListItemConverter.cs
- ReachFixedPageSerializerAsync.cs
- EntitySetRetriever.cs
- DesignerView.Commands.cs
- MultipleCopiesCollection.cs
- SmiContextFactory.cs
- AutomationElement.cs
- TreeView.cs
- XmlIterators.cs
- CachedBitmap.cs
- Opcode.cs
- URLAttribute.cs
- QueryOutputWriter.cs
- AttachedProperty.cs
- NumberEdit.cs
- ParameterCollectionEditorForm.cs
- SqlClientFactory.cs
- StringWriter.cs
- FilterableAttribute.cs
- StylusPoint.cs
- DateTimeSerializationSection.cs
- ReadOnlyAttribute.cs
- CompositeDataBoundControl.cs
- ConfigurationElementCollection.cs
- WindowInteractionStateTracker.cs
- BindingsCollection.cs
- UdpTransportSettingsElement.cs
- TypeConverter.cs
- Hashtable.cs
- SequenceDesigner.xaml.cs
- ApplicationProxyInternal.cs
- ToolStripSeparatorRenderEventArgs.cs
- TitleStyle.cs
- ConstantExpression.cs
- SafeFileMapViewHandle.cs
- ImportDesigner.xaml.cs
- UnitySerializationHolder.cs
- FontConverter.cs
- NestPullup.cs
- ExceptionNotification.cs
- TransformedBitmap.cs
- Matrix.cs
- DateTimeConstantAttribute.cs
- RegexParser.cs
- DbUpdateCommandTree.cs
- TraceUtility.cs
- DataSourceSelectArguments.cs
- HtmlShimManager.cs
- PopupEventArgs.cs
- SimpleRecyclingCache.cs
- EdmTypeAttribute.cs
- AggregateNode.cs
- JournalEntry.cs
- relpropertyhelper.cs
- NativeMethods.cs