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
- ProviderCommandInfoUtils.cs
- ProfileInfo.cs
- CapabilitiesAssignment.cs
- TransformPattern.cs
- MonthChangedEventArgs.cs
- SpeechEvent.cs
- CompilerErrorCollection.cs
- CustomWebEventKey.cs
- Animatable.cs
- PngBitmapEncoder.cs
- StrokeNode.cs
- UpdateCommand.cs
- DesignObjectWrapper.cs
- CodeFieldReferenceExpression.cs
- FileDialogCustomPlace.cs
- ComAdminWrapper.cs
- GridViewSelectEventArgs.cs
- WeakEventTable.cs
- NameScopePropertyAttribute.cs
- Compiler.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- RenderData.cs
- SettingsPropertyNotFoundException.cs
- RIPEMD160Managed.cs
- XmlWrappingReader.cs
- InstancePersistenceContext.cs
- GeometryDrawing.cs
- Listbox.cs
- EFTableProvider.cs
- x509store.cs
- XmlUnspecifiedAttribute.cs
- Emitter.cs
- ContentTextAutomationPeer.cs
- DSACryptoServiceProvider.cs
- CLSCompliantAttribute.cs
- Paragraph.cs
- AuthorizationSection.cs
- PropertyConverter.cs
- LocalizationComments.cs
- DataGridViewToolTip.cs
- ResolvedKeyFrameEntry.cs
- HttpModuleAction.cs
- StringFreezingAttribute.cs
- ReachUIElementCollectionSerializer.cs
- RangeValuePattern.cs
- CaseStatementProjectedSlot.cs
- CaseCqlBlock.cs
- DataGridViewDataErrorEventArgs.cs
- PauseStoryboard.cs
- DataGridColumnCollection.cs
- ProcessHostServerConfig.cs
- HistoryEventArgs.cs
- Expander.cs
- TrustSection.cs
- XmlSerializerSection.cs
- AdPostCacheSubstitution.cs
- Image.cs
- CompositeFontInfo.cs
- SafeEventLogReadHandle.cs
- ArraySubsetEnumerator.cs
- IBuiltInEvidence.cs
- DataGridViewToolTip.cs
- RoutedEventHandlerInfo.cs
- IUnknownConstantAttribute.cs
- ScriptServiceAttribute.cs
- ReflectionServiceProvider.cs
- MemoryRecordBuffer.cs
- ContainsRowNumberChecker.cs
- ColorConverter.cs
- Label.cs
- FontStyle.cs
- SQLGuid.cs
- ColumnMapVisitor.cs
- LinearKeyFrames.cs
- NumericExpr.cs
- DataGridViewTopLeftHeaderCell.cs
- ValueSerializer.cs
- MimeTextImporter.cs
- DelegatingStream.cs
- InstanceHandle.cs
- SecurityUtils.cs
- InteropEnvironment.cs
- BrowserTree.cs
- ResourceCategoryAttribute.cs
- TypeGeneratedEventArgs.cs
- FormViewInsertedEventArgs.cs
- AffineTransform3D.cs
- AppDomainShutdownMonitor.cs
- StreamGeometry.cs
- XmlSchemaInclude.cs
- ResXResourceWriter.cs
- ThicknessAnimationUsingKeyFrames.cs
- Application.cs
- PhysicalAddress.cs
- TreeWalker.cs
- PipelineModuleStepContainer.cs
- TimeManager.cs
- RunWorkerCompletedEventArgs.cs
- LineGeometry.cs
- XpsSerializationException.cs