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
- ExpressionPrefixAttribute.cs
- XmlNullResolver.cs
- UpdateRecord.cs
- RNGCryptoServiceProvider.cs
- SkipStoryboardToFill.cs
- ResourceKey.cs
- CleanUpVirtualizedItemEventArgs.cs
- LayoutInformation.cs
- OleDbCommand.cs
- GridViewCellAutomationPeer.cs
- GridViewCancelEditEventArgs.cs
- StringHelper.cs
- BindingMAnagerBase.cs
- InstanceStore.cs
- InternalConfirm.cs
- XmlAttributeProperties.cs
- WrapPanel.cs
- TemplateBindingExpressionConverter.cs
- ManualWorkflowSchedulerService.cs
- SplitterDesigner.cs
- ProcessThread.cs
- BufferedGraphics.cs
- BrowserCapabilitiesFactoryBase.cs
- EncodingNLS.cs
- CachedFontFamily.cs
- NetworkAddressChange.cs
- ControlBuilder.cs
- TriggerActionCollection.cs
- UnknownWrapper.cs
- EndpointConfigContainer.cs
- GatewayIPAddressInformationCollection.cs
- Stroke2.cs
- SafeThemeHandle.cs
- LocalBuilder.cs
- ConfigXmlText.cs
- FormsAuthenticationUser.cs
- WmlPageAdapter.cs
- Slider.cs
- GotoExpression.cs
- InertiaExpansionBehavior.cs
- TrustManagerPromptUI.cs
- ClientBuildManager.cs
- XmlDataSource.cs
- BaseCollection.cs
- XmlLinkedNode.cs
- CompositeFontFamily.cs
- SchemaCollectionPreprocessor.cs
- DataSetMappper.cs
- HierarchicalDataBoundControl.cs
- FrameworkElementFactoryMarkupObject.cs
- CommandManager.cs
- ClientUtils.cs
- XmlNamespaceMapping.cs
- InputScopeConverter.cs
- AnchoredBlock.cs
- SmtpDigestAuthenticationModule.cs
- ProxyWebPartManager.cs
- TreeNodeClickEventArgs.cs
- MultipleViewProviderWrapper.cs
- CqlParser.cs
- Delay.cs
- AnimationClock.cs
- ResXResourceSet.cs
- SigningCredentials.cs
- PKCS1MaskGenerationMethod.cs
- ConfigurationSectionGroup.cs
- FilterQuery.cs
- TextTreeDeleteContentUndoUnit.cs
- DesignerForm.cs
- UIPermission.cs
- UntypedNullExpression.cs
- BitmapSizeOptions.cs
- _WebProxyDataBuilder.cs
- CultureInfoConverter.cs
- WebAdminConfigurationHelper.cs
- XmlCollation.cs
- ParserStack.cs
- DataGridViewTextBoxColumn.cs
- SqlTypesSchemaImporter.cs
- XmlSchemaCollection.cs
- DelayedRegex.cs
- EdmPropertyAttribute.cs
- ProfilePropertySettings.cs
- XmlEnumAttribute.cs
- DecoderExceptionFallback.cs
- LambdaCompiler.Logical.cs
- ThrowHelper.cs
- SafeThemeHandle.cs
- RequestReplyCorrelator.cs
- TextAnchor.cs
- Propagator.JoinPropagator.cs
- ReturnValue.cs
- MsmqMessageSerializationFormat.cs
- ManipulationVelocities.cs
- CreateParams.cs
- EdmType.cs
- hwndwrapper.cs
- DataViewSetting.cs
- SourceFileBuildProvider.cs
- StorageMappingItemLoader.cs