Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- XmlSchemaInferenceException.cs
- CachedTypeface.cs
- BaseTemplateCodeDomTreeGenerator.cs
- XmlIlGenerator.cs
- DbConnectionFactory.cs
- DataGridViewCellPaintingEventArgs.cs
- WaitHandle.cs
- IsolatedStorageFileStream.cs
- WebPartRestoreVerb.cs
- Mapping.cs
- ContentValidator.cs
- HttpServerProtocol.cs
- SamlNameIdentifierClaimResource.cs
- AggregationMinMaxHelpers.cs
- mansign.cs
- basenumberconverter.cs
- ComponentRenameEvent.cs
- ParseHttpDate.cs
- AssociationSet.cs
- ClientFormsAuthenticationMembershipProvider.cs
- OverflowException.cs
- MaterialGroup.cs
- FunctionDefinition.cs
- FileLogRecord.cs
- wgx_sdk_version.cs
- FixedSOMTable.cs
- XmlLangPropertyAttribute.cs
- JapaneseCalendar.cs
- ServiceThrottlingBehavior.cs
- LayoutInformation.cs
- DoubleLinkList.cs
- DesignerObjectListAdapter.cs
- IndexedWhereQueryOperator.cs
- XmlHierarchicalEnumerable.cs
- QueryCacheKey.cs
- NextPreviousPagerField.cs
- ReceiveActivity.cs
- CTreeGenerator.cs
- Privilege.cs
- Compilation.cs
- CqlLexerHelpers.cs
- WindowsToolbarAsMenu.cs
- XmlReturnWriter.cs
- Menu.cs
- ProfileManager.cs
- RelativeSource.cs
- PatternMatcher.cs
- Matrix.cs
- Types.cs
- BufferAllocator.cs
- _BasicClient.cs
- QilLoop.cs
- BamlReader.cs
- EncryptedData.cs
- SqlExpander.cs
- URLAttribute.cs
- XmlSchemaNotation.cs
- RetrieveVirtualItemEventArgs.cs
- UnsafePeerToPeerMethods.cs
- Marshal.cs
- ProviderSettings.cs
- PropertyGeneratedEventArgs.cs
- PresentationAppDomainManager.cs
- ContainerVisual.cs
- QueueProcessor.cs
- ParamArrayAttribute.cs
- XmlSchemaAttributeGroup.cs
- CancelEventArgs.cs
- DataPagerFieldCollection.cs
- ChainOfDependencies.cs
- VerificationAttribute.cs
- CryptoStream.cs
- ApplicationSettingsBase.cs
- AnnotationComponentChooser.cs
- SurrogateSelector.cs
- InternalMappingException.cs
- BufferModesCollection.cs
- XhtmlBasicControlAdapter.cs
- DynamicPropertyHolder.cs
- DeferrableContent.cs
- SelectionRange.cs
- StrongNamePublicKeyBlob.cs
- PropertyCollection.cs
- WizardForm.cs
- BitSet.cs
- CustomAttribute.cs
- CustomCategoryAttribute.cs
- ReliableChannelFactory.cs
- WorkflowQueueInfo.cs
- LassoSelectionBehavior.cs
- ClientRolePrincipal.cs
- ComponentResourceManager.cs
- UserControlParser.cs
- Fonts.cs
- WeakRefEnumerator.cs
- StylusPointPropertyInfoDefaults.cs
- ResourceWriter.cs
- IsolatedStorageFilePermission.cs
- PropertyDescriptorComparer.cs
- ThicknessKeyFrameCollection.cs