Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- CultureSpecificStringDictionary.cs
- XmlStringTable.cs
- ToolStripContainerActionList.cs
- CodeTypeParameter.cs
- CalendarAutoFormat.cs
- FileDialog_Vista.cs
- SelectionItemPattern.cs
- DefaultEvaluationContext.cs
- CheckBoxRenderer.cs
- ThousandthOfEmRealPoints.cs
- WebPartsSection.cs
- ReferenceConverter.cs
- FilteredSchemaElementLookUpTable.cs
- BasicBrowserDialog.designer.cs
- MessageFilterTable.cs
- FrameworkElementAutomationPeer.cs
- BamlBinaryReader.cs
- SqlConnectionPoolProviderInfo.cs
- DbgCompiler.cs
- X509ScopedServiceCertificateElement.cs
- CodeArrayIndexerExpression.cs
- XmlKeywords.cs
- AnchorEditor.cs
- Quaternion.cs
- EndEvent.cs
- TimeoutException.cs
- CollectionViewProxy.cs
- ToolBarOverflowPanel.cs
- TextServicesProperty.cs
- NetStream.cs
- DateTimeAutomationPeer.cs
- DataBindingList.cs
- KeyedCollection.cs
- PointHitTestResult.cs
- XmlExpressionDumper.cs
- KeyInterop.cs
- HistoryEventArgs.cs
- StreamUpgradeInitiator.cs
- DefaultValidator.cs
- MetricEntry.cs
- SqlProviderServices.cs
- TextContainerChangeEventArgs.cs
- SettingsBindableAttribute.cs
- MultipartIdentifier.cs
- SoapTypeAttribute.cs
- GridViewRow.cs
- HttpCookiesSection.cs
- XPathEmptyIterator.cs
- IisTraceWebEventProvider.cs
- TreeNodeClickEventArgs.cs
- ColumnMapVisitor.cs
- InvalidPrinterException.cs
- Error.cs
- DataGridViewRowsRemovedEventArgs.cs
- PerfProviderCollection.cs
- DesignerVerbCollection.cs
- BatchWriter.cs
- X509Certificate.cs
- _DigestClient.cs
- DiscoveryOperationContext.cs
- ConnectionPointCookie.cs
- XmlBoundElement.cs
- PageBreakRecord.cs
- BigInt.cs
- BindingUtils.cs
- XmlBaseWriter.cs
- APCustomTypeDescriptor.cs
- JavaScriptString.cs
- SqlTriggerAttribute.cs
- TextBoxBase.cs
- EncryptedHeaderXml.cs
- Rect3DConverter.cs
- AsymmetricSecurityBindingElement.cs
- InkCanvasSelection.cs
- ProcessHost.cs
- PartialTrustVisibleAssemblyCollection.cs
- ClientConfigPaths.cs
- CloseCollectionAsyncResult.cs
- AdornedElementPlaceholder.cs
- SymLanguageType.cs
- odbcmetadatacollectionnames.cs
- Compilation.cs
- Vector3DAnimationUsingKeyFrames.cs
- AsyncResult.cs
- LongMinMaxAggregationOperator.cs
- ContainerSelectorActiveEvent.cs
- RegisteredScript.cs
- GridPattern.cs
- JoinGraph.cs
- ApplicationDirectoryMembershipCondition.cs
- SystemIPInterfaceStatistics.cs
- ReferenceConverter.cs
- MimeParameters.cs
- ProcessHost.cs
- InputBindingCollection.cs
- HMACSHA512.cs
- EdgeProfileValidation.cs
- RemoteX509AsymmetricSecurityKey.cs
- DrawListViewColumnHeaderEventArgs.cs
- SecurityException.cs