Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DLinq / Dlinq / SubqueryRules.cs / 1305376 / SubqueryRules.cs
using System; using System.Collections.Generic; using System.Text; using System.Reflection; using System.Linq.Expressions; namespace System.Data.Linq { ////// Encodes the rules for subqueries. /// static class SubqueryRules { ////// This list of top-level methods that are supported in subqueries. /// /// ///static internal bool IsSupportedTopLevelMethod(MethodInfo mi) { if (!IsSequenceOperatorCall(mi)) return false; switch (mi.Name) { case "Where": case "OrderBy": case "OrderByDescending": case "ThenBy": case "ThenByDescending": case "Take": return true; } return false; } private static bool IsSequenceOperatorCall(MethodInfo mi) { Type declType = mi.DeclaringType; if (declType == typeof(System.Linq.Enumerable) || declType == typeof(System.Linq.Queryable)) { return true; } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WinInetCache.cs
- AccessControlEntry.cs
- ClusterSafeNativeMethods.cs
- SecurityException.cs
- WinEventWrap.cs
- TreeViewImageKeyConverter.cs
- SourceChangedEventArgs.cs
- IfAction.cs
- DetailsView.cs
- WinHttpWebProxyFinder.cs
- TimeEnumHelper.cs
- CurrentChangingEventManager.cs
- ZipIOFileItemStream.cs
- MediaContextNotificationWindow.cs
- DataMemberConverter.cs
- DataRowCollection.cs
- WebPartManager.cs
- XmlChoiceIdentifierAttribute.cs
- Subset.cs
- ArithmeticException.cs
- ISAPIWorkerRequest.cs
- WebReferencesBuildProvider.cs
- QilGenerator.cs
- TypeUnloadedException.cs
- GuidTagList.cs
- _AutoWebProxyScriptWrapper.cs
- Identity.cs
- OdbcRowUpdatingEvent.cs
- NavigationCommands.cs
- HyperLinkField.cs
- MainMenu.cs
- XmlDesignerDataSourceView.cs
- TCEAdapterGenerator.cs
- NumericUpDownAcceleration.cs
- TemplatedAdorner.cs
- DataServices.cs
- SafeEventLogWriteHandle.cs
- BreakRecordTable.cs
- PolicyStatement.cs
- SafeWaitHandle.cs
- LifetimeServices.cs
- TextProviderWrapper.cs
- MethodImplAttribute.cs
- ping.cs
- SHA256Managed.cs
- PriorityItem.cs
- InputLanguageManager.cs
- ReadOnlyDictionary.cs
- ContractBase.cs
- ClassGenerator.cs
- XmlAttributes.cs
- VisualTarget.cs
- EnumBuilder.cs
- NameNode.cs
- ZoomPercentageConverter.cs
- PageBuildProvider.cs
- DllNotFoundException.cs
- VisualCollection.cs
- EntityDataSourceMemberPath.cs
- EventLogPermissionEntryCollection.cs
- AtomMaterializerLog.cs
- JsonFormatMapping.cs
- PartitionerQueryOperator.cs
- DrawListViewColumnHeaderEventArgs.cs
- LockCookie.cs
- DataGridPageChangedEventArgs.cs
- DataTableMappingCollection.cs
- VirtualizingPanel.cs
- EntityKeyElement.cs
- ToolStripPanel.cs
- SamlAttributeStatement.cs
- RC2CryptoServiceProvider.cs
- OleDbConnection.cs
- DrawingContextDrawingContextWalker.cs
- IChannel.cs
- DockAndAnchorLayout.cs
- InvalidWorkflowException.cs
- ClientTargetCollection.cs
- ProxyElement.cs
- UITypeEditor.cs
- CookieProtection.cs
- ProfessionalColorTable.cs
- SqlMethods.cs
- ListItem.cs
- GenerateScriptTypeAttribute.cs
- ObjectDisposedException.cs
- WebBrowserSiteBase.cs
- UIntPtr.cs
- ToolStripContentPanelDesigner.cs
- XNameTypeConverter.cs
- InputLangChangeEvent.cs
- DataExchangeServiceBinder.cs
- HttpHandlerActionCollection.cs
- ControlBindingsCollection.cs
- CurrentTimeZone.cs
- InstancePersistenceContext.cs
- Attributes.cs
- MetabaseServerConfig.cs
- WeakEventTable.cs
- XmlQualifiedName.cs