Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- Vector3D.cs
- FindResponse.cs
- ReturnType.cs
- ApplicationContext.cs
- EntityCommandExecutionException.cs
- ArraySubsetEnumerator.cs
- AtomContentProperty.cs
- DataContractSerializerServiceBehavior.cs
- TcpConnectionPool.cs
- GenerateTemporaryTargetAssembly.cs
- GPPOINT.cs
- WmlLabelAdapter.cs
- ParallelLoopState.cs
- Serializer.cs
- Bezier.cs
- WebBrowser.cs
- AxParameterData.cs
- DesignerView.cs
- DetailsViewPagerRow.cs
- __TransparentProxy.cs
- Polyline.cs
- CatalogZoneBase.cs
- BamlRecordReader.cs
- PenContext.cs
- DataObjectFieldAttribute.cs
- RC2CryptoServiceProvider.cs
- ObjectAssociationEndMapping.cs
- DesignDataSource.cs
- SqlDelegatedTransaction.cs
- Page.cs
- ObjectDataSource.cs
- ColorIndependentAnimationStorage.cs
- HttpWebResponse.cs
- MappingModelBuildProvider.cs
- ContentElement.cs
- UnsafeNetInfoNativeMethods.cs
- Color.cs
- Point4DConverter.cs
- QueryAccessibilityHelpEvent.cs
- ExtensionQuery.cs
- StorageModelBuildProvider.cs
- ICspAsymmetricAlgorithm.cs
- InfoCardRSACryptoProvider.cs
- SqlXmlStorage.cs
- IsolatedStorageFileStream.cs
- OptimalBreakSession.cs
- FilteredDataSetHelper.cs
- NaturalLanguageHyphenator.cs
- Int32RectConverter.cs
- DrawingBrush.cs
- DataFieldEditor.cs
- DesignerRegionCollection.cs
- SkipQueryOptionExpression.cs
- PasswordRecoveryAutoFormat.cs
- HtmlControl.cs
- ScriptingJsonSerializationSection.cs
- HitTestWithPointDrawingContextWalker.cs
- X509IssuerSerialKeyIdentifierClause.cs
- ExtenderProvidedPropertyAttribute.cs
- FlowDocumentPaginator.cs
- ReadOnlyDataSource.cs
- DuplicateWaitObjectException.cs
- InvalidProgramException.cs
- ObjectNotFoundException.cs
- LogReservationCollection.cs
- _LoggingObject.cs
- Point.cs
- returneventsaver.cs
- PolyBezierSegment.cs
- ArcSegment.cs
- AppDomainProtocolHandler.cs
- ObjRef.cs
- DataSourceExpressionCollection.cs
- RectValueSerializer.cs
- RoleBoolean.cs
- TableLayoutCellPaintEventArgs.cs
- basecomparevalidator.cs
- DataDesignUtil.cs
- UpdateTranslator.cs
- ServiceModelInstallComponent.cs
- VectorCollection.cs
- EntryPointNotFoundException.cs
- RefreshPropertiesAttribute.cs
- TriggerBase.cs
- EntityClientCacheEntry.cs
- ThemeInfoAttribute.cs
- OracleMonthSpan.cs
- Automation.cs
- EFColumnProvider.cs
- ChannelManagerService.cs
- ClientFormsAuthenticationCredentials.cs
- BitmapPalettes.cs
- RowUpdatingEventArgs.cs
- XamlClipboardData.cs
- AuthenticateEventArgs.cs
- WpfXamlLoader.cs
- BrowserCapabilitiesCodeGenerator.cs
- GifBitmapDecoder.cs
- elementinformation.cs
- OleDbInfoMessageEvent.cs