Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- TextEndOfLine.cs
- DataAdapter.cs
- ConfigDefinitionUpdates.cs
- RangeValuePattern.cs
- UnaryExpression.cs
- OptimalBreakSession.cs
- StoreContentChangedEventArgs.cs
- ThreadPool.cs
- XmlSerializerOperationGenerator.cs
- CodePageEncoding.cs
- DrawingServices.cs
- Transform3DCollection.cs
- FastEncoder.cs
- BufferAllocator.cs
- ModuleBuilder.cs
- Activator.cs
- SynchronizingStream.cs
- StylusCollection.cs
- ProxyHelper.cs
- StreamHelper.cs
- XmlLinkedNode.cs
- PkcsMisc.cs
- RegexGroup.cs
- Span.cs
- ProtocolProfile.cs
- SqlDataRecord.cs
- HtmlTableCell.cs
- ThousandthOfEmRealDoubles.cs
- TemplateControlParser.cs
- SynchronizingStream.cs
- WindowsPen.cs
- WebEventCodes.cs
- ParameterToken.cs
- GuidelineCollection.cs
- AggregationMinMaxHelpers.cs
- StyleSelector.cs
- WindowsAltTab.cs
- NavigationCommands.cs
- ConnectionPoolManager.cs
- Table.cs
- HMACSHA512.cs
- RadioButtonList.cs
- StringFreezingAttribute.cs
- InfoCardRSACryptoProvider.cs
- TabControlCancelEvent.cs
- ContextMenu.cs
- OciLobLocator.cs
- NetDataContractSerializer.cs
- MouseBinding.cs
- CompareValidator.cs
- ObjectListTitleAttribute.cs
- coordinatorfactory.cs
- XsdCachingReader.cs
- ValueType.cs
- ImageButton.cs
- DiscoveryClientDuplexChannel.cs
- MiniLockedBorderGlyph.cs
- SchemaElementDecl.cs
- DataListItem.cs
- DataGridViewTextBoxEditingControl.cs
- WebReference.cs
- MenuItemCollection.cs
- HttpCachePolicyWrapper.cs
- TreeNodeBinding.cs
- LogicalExpressionEditor.cs
- AutomationPatternInfo.cs
- _NetRes.cs
- GiveFeedbackEvent.cs
- DataGridViewSortCompareEventArgs.cs
- SynchronizationScope.cs
- Transform.cs
- UnknownMessageReceivedEventArgs.cs
- TextEndOfParagraph.cs
- XmlTextAttribute.cs
- ResourcesChangeInfo.cs
- FormParameter.cs
- DefaultObjectMappingItemCollection.cs
- ImageCodecInfo.cs
- ReferentialConstraintRoleElement.cs
- IntSecurity.cs
- Lease.cs
- XmlAggregates.cs
- Rect3D.cs
- ThousandthOfEmRealDoubles.cs
- CachedBitmap.cs
- SQLDecimalStorage.cs
- CodeCompileUnit.cs
- ObjectPersistData.cs
- QueryContinueDragEventArgs.cs
- ActivityInterfaces.cs
- NestedContainer.cs
- ThousandthOfEmRealPoints.cs
- StrokeRenderer.cs
- DataObjectCopyingEventArgs.cs
- StringFunctions.cs
- AstTree.cs
- ReachDocumentPageSerializerAsync.cs
- ReliabilityContractAttribute.cs
- CompleteWizardStep.cs
- GeneralTransform3D.cs