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
- DES.cs
- StorageSetMapping.cs
- WindowsListViewScroll.cs
- InputManager.cs
- CannotUnloadAppDomainException.cs
- HtmlTernaryTree.cs
- HandlerBase.cs
- HttpChannelFactory.cs
- OdbcException.cs
- UpDownEvent.cs
- XpsThumbnail.cs
- CodeDomDesignerLoader.cs
- XmlCountingReader.cs
- TextWriterTraceListener.cs
- BindingMemberInfo.cs
- FlowNode.cs
- Function.cs
- SchemaCollectionCompiler.cs
- PkcsUtils.cs
- SimpleMailWebEventProvider.cs
- PageContentAsyncResult.cs
- ToolStripContainer.cs
- __FastResourceComparer.cs
- ColorAnimationUsingKeyFrames.cs
- CopyCodeAction.cs
- ASCIIEncoding.cs
- VirtualizedCellInfoCollection.cs
- GroupItem.cs
- HelpKeywordAttribute.cs
- DataGridViewUtilities.cs
- UIElementPropertyUndoUnit.cs
- TableLayoutStyleCollection.cs
- InputReport.cs
- MetadataArtifactLoader.cs
- DesignerToolStripControlHost.cs
- CodeNamespaceImportCollection.cs
- BuildManagerHost.cs
- DetailsView.cs
- PrivilegedConfigurationManager.cs
- MULTI_QI.cs
- ComponentEditorForm.cs
- CodeCommentStatement.cs
- TypeBuilder.cs
- DigitalSignature.cs
- ToolStripItemEventArgs.cs
- UpdatePanelTriggerCollection.cs
- ListViewSelectEventArgs.cs
- PerspectiveCamera.cs
- BitmapEffectGeneralTransform.cs
- EngineSiteSapi.cs
- MouseWheelEventArgs.cs
- ResourceReader.cs
- IndexedString.cs
- EarlyBoundInfo.cs
- InputManager.cs
- XmlWhitespace.cs
- designeractionbehavior.cs
- TextBox.cs
- TreeViewAutomationPeer.cs
- PixelFormats.cs
- ObjectSelectorEditor.cs
- UnionCqlBlock.cs
- ParamArrayAttribute.cs
- sqlstateclientmanager.cs
- ObjectManager.cs
- RC2CryptoServiceProvider.cs
- DecoderExceptionFallback.cs
- CommandLibraryHelper.cs
- VectorKeyFrameCollection.cs
- SequenceDesigner.cs
- BitmapData.cs
- HandlerFactoryCache.cs
- ILGenerator.cs
- MembershipUser.cs
- RegexCaptureCollection.cs
- COM2PictureConverter.cs
- RubberbandSelector.cs
- User.cs
- EncodingDataItem.cs
- EntityContainerRelationshipSetEnd.cs
- BooleanConverter.cs
- sqlinternaltransaction.cs
- MsmqMessageProperty.cs
- TextWriterEngine.cs
- DBSchemaRow.cs
- SafeWaitHandle.cs
- TimeStampChecker.cs
- Grid.cs
- MsmqHostedTransportConfiguration.cs
- WmlObjectListAdapter.cs
- EntityDataSourceChangingEventArgs.cs
- SchemaTableColumn.cs
- ConfigurationValidatorAttribute.cs
- NegotiateStream.cs
- TypeDescriptorContext.cs
- FilteredSchemaElementLookUpTable.cs
- BamlLocalizabilityResolver.cs
- NavigationService.cs
- SortQuery.cs
- VideoDrawing.cs