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
- TagPrefixCollection.cs
- HttpContext.cs
- ArrayWithOffset.cs
- ParagraphVisual.cs
- ExtendedProperty.cs
- OutputCacheSection.cs
- CryptoKeySecurity.cs
- RootProfilePropertySettingsCollection.cs
- DataPager.cs
- MarkedHighlightComponent.cs
- StringToken.cs
- CompilerGeneratedAttribute.cs
- XmlSchema.cs
- CompiledQuery.cs
- MSAAWinEventWrap.cs
- DataGridViewCellValueEventArgs.cs
- AssemblyResourceLoader.cs
- TableItemPattern.cs
- SafeHandles.cs
- X509CertificateChain.cs
- XDRSchema.cs
- GridLength.cs
- CrossContextChannel.cs
- oledbconnectionstring.cs
- ManagedIStream.cs
- DescendentsWalker.cs
- RoleGroup.cs
- Vector3DValueSerializer.cs
- ArrangedElementCollection.cs
- DataControlFieldCell.cs
- WindowClosedEventArgs.cs
- TokenBasedSet.cs
- Selection.cs
- ReadingWritingEntityEventArgs.cs
- ExtensionFile.cs
- TrustLevelCollection.cs
- LinkTarget.cs
- DispatcherExceptionEventArgs.cs
- IOException.cs
- RelationshipConverter.cs
- DrawToolTipEventArgs.cs
- PropertyNames.cs
- Utility.cs
- InputProcessorProfiles.cs
- SplineKeyFrames.cs
- GeneralTransform3D.cs
- RoleManagerSection.cs
- XPathAncestorIterator.cs
- XmlLoader.cs
- SystemWebSectionGroup.cs
- DownloadProgressEventArgs.cs
- ActiveXSite.cs
- __Error.cs
- BaseCollection.cs
- GridViewUpdateEventArgs.cs
- BinaryReader.cs
- MenuItem.cs
- CodeNamespaceCollection.cs
- RecognizeCompletedEventArgs.cs
- FamilyCollection.cs
- ComplexPropertyEntry.cs
- InitializingNewItemEventArgs.cs
- ScriptModule.cs
- ThousandthOfEmRealPoints.cs
- XmlSerializerOperationBehavior.cs
- EmptyStringExpandableObjectConverter.cs
- ContextMenuStripGroup.cs
- ToolboxItemWrapper.cs
- ListSourceHelper.cs
- GroupBoxRenderer.cs
- WorkflowWebService.cs
- ColumnPropertiesGroup.cs
- SerializationBinder.cs
- TableHeaderCell.cs
- SqlProviderManifest.cs
- Collection.cs
- HexParser.cs
- BuilderInfo.cs
- Control.cs
- CodeConstructor.cs
- ScriptRegistrationManager.cs
- XslException.cs
- WebPartConnectionsConnectVerb.cs
- TiffBitmapDecoder.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- TreeViewAutomationPeer.cs
- SendingRequestEventArgs.cs
- QueryOperationResponseOfT.cs
- NumericPagerField.cs
- BooleanStorage.cs
- UMPAttributes.cs
- DecoderExceptionFallback.cs
- DbConnectionHelper.cs
- Size.cs
- designeractionbehavior.cs
- Int32AnimationBase.cs
- CompilerTypeWithParams.cs
- NonVisualControlAttribute.cs
- OpCellTreeNode.cs
- TextCollapsingProperties.cs