Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DLinq / Dlinq / SubqueryRules.cs / 1 / 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. 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
- EndOfStreamException.cs
- Overlapped.cs
- DataGridViewColumnHeaderCell.cs
- QuotedStringWriteStateInfo.cs
- ComponentEditorPage.cs
- ToolStripItemImageRenderEventArgs.cs
- EntityDataSourceReferenceGroup.cs
- MaterialCollection.cs
- DashStyles.cs
- SizeF.cs
- CodeArrayIndexerExpression.cs
- SmiMetaData.cs
- ConfigXmlReader.cs
- PeerCredentialElement.cs
- TrustVersion.cs
- FontDriver.cs
- EntityClientCacheEntry.cs
- DefaultIfEmptyQueryOperator.cs
- EntityDataSourceSelectedEventArgs.cs
- DurableEnlistmentState.cs
- InkPresenter.cs
- ControlIdConverter.cs
- PenLineCapValidation.cs
- RegistryPermission.cs
- Camera.cs
- LayoutInformation.cs
- HttpInputStream.cs
- MouseEvent.cs
- VersionValidator.cs
- SymLanguageVendor.cs
- SingleObjectCollection.cs
- ConfigurationManagerHelper.cs
- ToolStripDesigner.cs
- InvalidFilterCriteriaException.cs
- ActivityTypeResolver.xaml.cs
- InputBuffer.cs
- WorkflowTimerService.cs
- PenLineCapValidation.cs
- ChildDocumentBlock.cs
- SelectorItemAutomationPeer.cs
- CatalogPartChrome.cs
- WindowAutomationPeer.cs
- Panel.cs
- RequestNavigateEventArgs.cs
- ListViewPagedDataSource.cs
- TextBoxAutoCompleteSourceConverter.cs
- ObjectDataSourceView.cs
- ResolveNameEventArgs.cs
- DeferredTextReference.cs
- BoolLiteral.cs
- XmlSchema.cs
- Win32MouseDevice.cs
- Rfc2898DeriveBytes.cs
- ChannelDispatcherCollection.cs
- TypeGenericEnumerableViewSchema.cs
- SoapObjectWriter.cs
- ReadOnlyObservableCollection.cs
- OutputScopeManager.cs
- coordinatorscratchpad.cs
- RichTextBox.cs
- COSERVERINFO.cs
- DataRelationCollection.cs
- IsolatedStoragePermission.cs
- RenderData.cs
- ReferenceService.cs
- StringResourceManager.cs
- SystemIcmpV6Statistics.cs
- MD5.cs
- ListBindingHelper.cs
- PixelFormat.cs
- _BasicClient.cs
- WpfPayload.cs
- AspCompat.cs
- EntityTypeBase.cs
- PipelineComponent.cs
- FormsAuthenticationEventArgs.cs
- GcSettings.cs
- Blend.cs
- ConnectionsZoneDesigner.cs
- IndependentAnimationStorage.cs
- EmbossBitmapEffect.cs
- TreeViewAutomationPeer.cs
- CodeExporter.cs
- RecipientInfo.cs
- FlowPosition.cs
- HttpProfileBase.cs
- SystemColors.cs
- RegionData.cs
- SimpleMailWebEventProvider.cs
- TypeElement.cs
- Sequence.cs
- PTUtility.cs
- EventQueueState.cs
- HttpResponseInternalWrapper.cs
- WindowsFormsHostPropertyMap.cs
- ChangeToolStripParentVerb.cs
- GridViewSortEventArgs.cs
- AxHost.cs
- UIHelper.cs
- XmlnsCache.cs