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
- PreviousTrackingServiceAttribute.cs
- GridLength.cs
- JoinElimination.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- InternalUserCancelledException.cs
- XmlDocumentSerializer.cs
- CacheDependency.cs
- DataGridViewToolTip.cs
- SiteMapHierarchicalDataSourceView.cs
- PackageRelationshipSelector.cs
- Comparer.cs
- ControlParameter.cs
- TransformerInfo.cs
- PinnedBufferMemoryStream.cs
- Ticks.cs
- PointAnimationClockResource.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- QueryCursorEventArgs.cs
- RequiredFieldValidator.cs
- SiteMapDataSourceView.cs
- KeyedHashAlgorithm.cs
- SyntaxCheck.cs
- FixedDocumentPaginator.cs
- X509CertificateValidator.cs
- ServiceRoute.cs
- HtmlContainerControl.cs
- HtmlFormWrapper.cs
- AlgoModule.cs
- FtpCachePolicyElement.cs
- RegexCharClass.cs
- XsdCachingReader.cs
- CodeCatchClause.cs
- IntegrationExceptionEventArgs.cs
- CollectionChangeEventArgs.cs
- NativeRecognizer.cs
- Attributes.cs
- XpsImage.cs
- SchemaNames.cs
- TemplateControlBuildProvider.cs
- PathTooLongException.cs
- basevalidator.cs
- PagesSection.cs
- PolicyLevel.cs
- TraceHandlerErrorFormatter.cs
- StorageInfo.cs
- BitmapEffectGroup.cs
- ContentType.cs
- ProxyAssemblyNotLoadedException.cs
- UniformGrid.cs
- InfoCardUIAgent.cs
- ListViewUpdatedEventArgs.cs
- NamedPermissionSet.cs
- FormsAuthentication.cs
- InvalidProgramException.cs
- complextypematerializer.cs
- VirtualDirectoryMapping.cs
- SQLDecimal.cs
- GlobalItem.cs
- ReadOnlyHierarchicalDataSourceView.cs
- XmlAttributeAttribute.cs
- PersonalizationEntry.cs
- RbTree.cs
- PagesSection.cs
- WebConfigurationManager.cs
- QuaternionAnimationBase.cs
- HandlerMappingMemo.cs
- ItemAutomationPeer.cs
- ISSmlParser.cs
- DbException.cs
- OdbcError.cs
- FillErrorEventArgs.cs
- login.cs
- LineBreakRecord.cs
- XmlHierarchicalEnumerable.cs
- __Error.cs
- RawStylusInputCustomData.cs
- Column.cs
- UIElement3DAutomationPeer.cs
- ShaderEffect.cs
- SiteMapHierarchicalDataSourceView.cs
- TabletDevice.cs
- DBSqlParserTable.cs
- Item.cs
- DataQuery.cs
- UserPreferenceChangingEventArgs.cs
- StateWorkerRequest.cs
- DataSetUtil.cs
- TreeNodeStyle.cs
- TrackingStringDictionary.cs
- GridViewUpdatedEventArgs.cs
- CustomAttributeSerializer.cs
- StringDictionary.cs
- QilInvokeEarlyBound.cs
- PenLineCapValidation.cs
- IIS7UserPrincipal.cs
- HistoryEventArgs.cs
- MessageDecoder.cs
- StringValidatorAttribute.cs
- QuinticEase.cs
- HitTestParameters.cs