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
- OdbcException.cs
- SoapFaultCodes.cs
- ObjectRef.cs
- X509RawDataKeyIdentifierClause.cs
- InstanceHandleReference.cs
- WpfPayload.cs
- XmlCDATASection.cs
- SessionIDManager.cs
- MultiView.cs
- Timer.cs
- SqlNodeAnnotations.cs
- NavigationCommands.cs
- SqlProfileProvider.cs
- StateManagedCollection.cs
- FixedSOMLineCollection.cs
- PersonalizationDictionary.cs
- ErrorProvider.cs
- SystemFonts.cs
- PeerNeighborManager.cs
- ComponentManagerBroker.cs
- webbrowsersite.cs
- SchemaCollectionCompiler.cs
- ContextProperty.cs
- ParseNumbers.cs
- ZoneMembershipCondition.cs
- SecureStringHasher.cs
- XmlObjectSerializer.cs
- SystemBrushes.cs
- PropertyConverter.cs
- nulltextcontainer.cs
- ControlValuePropertyAttribute.cs
- SqlDataSourceCommandEventArgs.cs
- UnsafeNativeMethods.cs
- PartialTrustVisibleAssemblyCollection.cs
- SrgsRule.cs
- ClientApiGenerator.cs
- WindowsFont.cs
- Renderer.cs
- SerializationInfoEnumerator.cs
- PolyLineSegmentFigureLogic.cs
- SystemDiagnosticsSection.cs
- WebBrowserSiteBase.cs
- MatrixValueSerializer.cs
- ErrorFormatter.cs
- M3DUtil.cs
- DifferencingCollection.cs
- DataGridViewColumnHeaderCell.cs
- PageVisual.cs
- SqlDataSourceAdvancedOptionsForm.cs
- BitmapFrameDecode.cs
- DataBoundControl.cs
- CustomAttributeSerializer.cs
- EntityDataSource.cs
- WorkflowService.cs
- SafeArchiveContext.cs
- ThemeDirectoryCompiler.cs
- ConditionalWeakTable.cs
- XmlReflectionMember.cs
- ListBase.cs
- Rfc2898DeriveBytes.cs
- BindableTemplateBuilder.cs
- MarshalByValueComponent.cs
- SortedSet.cs
- ArraySubsetEnumerator.cs
- RelationalExpressions.cs
- TrackingMemoryStream.cs
- COAUTHIDENTITY.cs
- KeyedCollection.cs
- CellParagraph.cs
- OleDbConnection.cs
- ToolboxItemImageConverter.cs
- UrlMappingsSection.cs
- Base64Decoder.cs
- Visual3D.cs
- DataGridViewRowHeaderCell.cs
- RewritingProcessor.cs
- MemberRestriction.cs
- Point3D.cs
- XhtmlBasicPanelAdapter.cs
- TargetPerspective.cs
- TabItemAutomationPeer.cs
- PropertyManager.cs
- RegularExpressionValidator.cs
- TrackingParticipant.cs
- WebZone.cs
- TextContainer.cs
- XmlCollation.cs
- ISAPIWorkerRequest.cs
- Span.cs
- DrawingGroup.cs
- CodeGenerator.cs
- QilTargetType.cs
- WindowsUpDown.cs
- ThreadAbortException.cs
- WebMessageEncodingBindingElement.cs
- ScrollViewerAutomationPeer.cs
- SizeIndependentAnimationStorage.cs
- SchemaLookupTable.cs
- DynamicUpdateCommand.cs
- CustomAttributeBuilder.cs