Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DLinq / Dlinq / SubqueryRules.cs / 1305376 / 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
- ButtonBase.cs
- Effect.cs
- DecimalConverter.cs
- InputMethodStateTypeInfo.cs
- TimeoutException.cs
- InternalResources.cs
- HtmlSelect.cs
- BoundColumn.cs
- Perspective.cs
- ObjectDataSourceDisposingEventArgs.cs
- GeneralTransform.cs
- securitycriticaldataformultiplegetandset.cs
- PathSegmentCollection.cs
- WebPartZone.cs
- DataGridViewImageColumn.cs
- CodeTypeMemberCollection.cs
- XmlEncoding.cs
- OpenCollectionAsyncResult.cs
- IFormattable.cs
- TileModeValidation.cs
- UniqueIdentifierService.cs
- SqlServer2KCompatibilityAnnotation.cs
- DbProviderConfigurationHandler.cs
- UnknownWrapper.cs
- SelectionListDesigner.cs
- TimeoutException.cs
- XmlWriter.cs
- XmlEventCache.cs
- LayoutInformation.cs
- XPathException.cs
- EntityContainerAssociationSetEnd.cs
- FixedSOMImage.cs
- Trace.cs
- WebServiceResponse.cs
- RemotingAttributes.cs
- LinqMaximalSubtreeNominator.cs
- DynamicRenderer.cs
- DropDownButton.cs
- CardSpaceShim.cs
- Privilege.cs
- MDIClient.cs
- LowerCaseStringConverter.cs
- SafeMemoryMappedViewHandle.cs
- ISessionStateStore.cs
- ProgressPage.cs
- BooleanAnimationUsingKeyFrames.cs
- SignedInfo.cs
- DataGridViewLinkColumn.cs
- DbConnectionPoolCounters.cs
- RtType.cs
- ListViewItemSelectionChangedEvent.cs
- ListenerElementsCollection.cs
- LinkDesigner.cs
- DataGridPageChangedEventArgs.cs
- SynchronizationLockException.cs
- mediaclock.cs
- GlyphingCache.cs
- CompoundFileReference.cs
- Transform3DCollection.cs
- ByValueEqualityComparer.cs
- Repeater.cs
- ButtonPopupAdapter.cs
- Property.cs
- Point.cs
- CommandField.cs
- BamlRecords.cs
- DbExpressionVisitor.cs
- PropertyStore.cs
- RemotingConfiguration.cs
- WinFormsSpinner.cs
- DateRangeEvent.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- PrintPreviewDialog.cs
- GlyphRun.cs
- HttpBufferlessInputStream.cs
- OperatorExpressions.cs
- SecurityCriticalDataForSet.cs
- FilteredSchemaElementLookUpTable.cs
- ExceptionNotification.cs
- ActivityContext.cs
- XmlSchemaObjectTable.cs
- DateTimeUtil.cs
- MessageSecurityVersionConverter.cs
- ContainerControl.cs
- OdbcConnectionPoolProviderInfo.cs
- OpacityConverter.cs
- ContextBase.cs
- BinaryObjectWriter.cs
- OwnerDrawPropertyBag.cs
- ObjectItemCollection.cs
- ExtensionDataObject.cs
- JavaScriptString.cs
- ComponentChangedEvent.cs
- MemberDescriptor.cs
- WeakRefEnumerator.cs
- ConfigViewGenerator.cs
- CommandDesigner.cs
- NumberFormatInfo.cs
- TableStyle.cs
- shaper.cs