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
- WebPageTraceListener.cs
- IsolatedStorage.cs
- StreamGeometry.cs
- ConstraintCollection.cs
- FixedSOMImage.cs
- AnnotationResourceChangedEventArgs.cs
- DataGridViewCellValidatingEventArgs.cs
- AssemblyInfo.cs
- WebPartActionVerb.cs
- DataStreams.cs
- FunctionNode.cs
- GetCertificateRequest.cs
- FigureParaClient.cs
- StreamInfo.cs
- XmlReaderSettings.cs
- ErrorTableItemStyle.cs
- CursorInteropHelper.cs
- Win32.cs
- Gdiplus.cs
- CharacterBuffer.cs
- TraceHandlerErrorFormatter.cs
- SelectorItemAutomationPeer.cs
- SqlBinder.cs
- DataRecordInfo.cs
- ThemeableAttribute.cs
- RegexStringValidatorAttribute.cs
- UpDownBase.cs
- UnsafePeerToPeerMethods.cs
- DispatcherProcessingDisabled.cs
- EventTrigger.cs
- HWStack.cs
- TagNameToTypeMapper.cs
- GenericParameterDataContract.cs
- ButtonRenderer.cs
- CharacterMetricsDictionary.cs
- AdapterDictionary.cs
- SoapExtensionImporter.cs
- ConstructorExpr.cs
- DocumentViewerHelper.cs
- CqlLexerHelpers.cs
- ShutDownListener.cs
- UnsafeNativeMethods.cs
- TextPointer.cs
- BitmapCacheBrush.cs
- WebPartManagerInternals.cs
- AssignDesigner.xaml.cs
- CacheHelper.cs
- SkipStoryboardToFill.cs
- PrintPreviewControl.cs
- NamespaceList.cs
- ADMembershipUser.cs
- ThaiBuddhistCalendar.cs
- StateDesigner.Layouts.cs
- EntityDataReader.cs
- ExpressionValueEditor.cs
- WhereQueryOperator.cs
- ConfigurationPropertyAttribute.cs
- BmpBitmapEncoder.cs
- FastPropertyAccessor.cs
- CompoundFileDeflateTransform.cs
- SystemColorTracker.cs
- SolidColorBrush.cs
- Menu.cs
- ArrayWithOffset.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- IMembershipProvider.cs
- SiteMapDataSourceView.cs
- _IPv4Address.cs
- HttpProfileBase.cs
- COAUTHIDENTITY.cs
- AffineTransform3D.cs
- _UncName.cs
- Model3D.cs
- FacetChecker.cs
- BitmapInitialize.cs
- Synchronization.cs
- BackgroundFormatInfo.cs
- input.cs
- ImageListDesigner.cs
- DataControlCommands.cs
- CachedCompositeFamily.cs
- SafeArchiveContext.cs
- IsolatedStorageFilePermission.cs
- xmlfixedPageInfo.cs
- TextElementCollection.cs
- MeasureItemEvent.cs
- SettingsBindableAttribute.cs
- ScrollBarAutomationPeer.cs
- DurableInstanceProvider.cs
- UrlPropertyAttribute.cs
- Section.cs
- DynamicILGenerator.cs
- CategoriesDocumentFormatter.cs
- SvcMapFileLoader.cs
- MessageDescriptionCollection.cs
- DoubleAnimation.cs
- DeploymentSection.cs
- GestureRecognitionResult.cs
- CursorConverter.cs
- RemotingAttributes.cs