Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Common / EntitySql / ParserOptions.cs / 1305376 / ParserOptions.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- namespace System.Data.Common.EntitySql { using System; using System.Globalization; // // disables XML doc overloads warning as error // #pragma warning disable 0419 ////// Represents eSQL Text Compilation options. /// ParserOptions can be optionaly passed to CqlQuery.Compile or CqlQuery.Parse methods /// internal sealed class ParserOptions { //////
///Thrown if the properties are changed after being consumed by CqlQuery.Parse or CqlQuery.Compile ////// Once ParserOptions is passed and consumed by Compile or Parse Methods, it cannot be changed. /// If a setter is called after a ParserOptions instance is consumed by Parse or Compile methods, a EntityException will be raised. /// ///- ///
Compile Method - ///
Parse Method /// Makes options read-only /// ///internal ParserOptions MakeReadOnly() { _bReadOnly = true; return this; } private bool _bReadOnly = false; internal enum CompilationMode { /// /// Normal mode. Compiles eSQL command without restrictions. /// NormalMode, ////// View generation mode: optimizes compilation process to ignore uncessary eSQL constructs: /// - GROUP BY, HAVING and ORDER BY clauses are ignored. /// - WITH RELATIONSHIP clause is allowed in type constructors. /// RestrictedViewGenerationMode, ////// Same as CompilationMode.Normal plus WITH RELATIONSHIP clause is allowed in type constructors. /// UserViewGenerationMode } ////// Sets/Gets eSQL parser compilation mode. /// internal CompilationMode ParserCompilationMode { get { return _compilationMode; } set { CheckIfReadOnly(); _compilationMode = value; } } private CompilationMode _compilationMode = CompilationMode.NormalMode; ////// Verify if setters are allowed. /// private void CheckIfReadOnly() { if (_bReadOnly) { throw EntityUtil.EntitySqlError(System.Data.Entity.Strings.PropertyCannotBeChangedAtThisTime); } } } #pragma warning restore 0419 } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CollectionViewProxy.cs
- WmfPlaceableFileHeader.cs
- SetterBaseCollection.cs
- VisualStates.cs
- TouchFrameEventArgs.cs
- LinqToSqlWrapper.cs
- RangeValueProviderWrapper.cs
- ToolStripPanelRenderEventArgs.cs
- EventRoute.cs
- HotSpot.cs
- ApplicationGesture.cs
- DrawingContextWalker.cs
- SmiTypedGetterSetter.cs
- NullableDoubleMinMaxAggregationOperator.cs
- RenderingEventArgs.cs
- TextEditorTyping.cs
- CommandExpr.cs
- GridItemProviderWrapper.cs
- StatusCommandUI.cs
- SchemaTableOptionalColumn.cs
- StatusBarDrawItemEvent.cs
- RadioButton.cs
- OciLobLocator.cs
- StoragePropertyMapping.cs
- BamlRecords.cs
- DataPagerFieldCollection.cs
- DataGridViewLinkCell.cs
- SchemaNamespaceManager.cs
- UrlPath.cs
- ErrorWebPart.cs
- RSAOAEPKeyExchangeFormatter.cs
- ProcessThreadCollection.cs
- StaticTextPointer.cs
- StrokeCollectionDefaultValueFactory.cs
- DependencyObjectPropertyDescriptor.cs
- WizardForm.cs
- BitmapEffect.cs
- SortFieldComparer.cs
- ProcessStartInfo.cs
- ArcSegment.cs
- SemaphoreFullException.cs
- BasicExpressionVisitor.cs
- QueryComponents.cs
- TogglePatternIdentifiers.cs
- _NegotiateClient.cs
- SplashScreen.cs
- DnsPermission.cs
- SystemColorTracker.cs
- ProtocolsConfigurationEntry.cs
- securitycriticaldataClass.cs
- DataGridAddNewRow.cs
- TypeSystemHelpers.cs
- Helpers.cs
- CfgArc.cs
- StrokeNodeData.cs
- XmlObjectSerializerReadContext.cs
- CodeSubDirectoriesCollection.cs
- EntityDataSourceSelectedEventArgs.cs
- BitmapImage.cs
- ResourceManagerWrapper.cs
- InertiaTranslationBehavior.cs
- Merger.cs
- Guid.cs
- MemoryStream.cs
- SystemResources.cs
- RemoveStoryboard.cs
- NamespaceQuery.cs
- TextStore.cs
- RolePrincipal.cs
- LookupNode.cs
- HitTestDrawingContextWalker.cs
- HostingEnvironment.cs
- ComplexTypeEmitter.cs
- AbandonedMutexException.cs
- HttpAsyncResult.cs
- HttpCacheVaryByContentEncodings.cs
- DescriptionAttribute.cs
- FacetValues.cs
- DbModificationCommandTree.cs
- TripleDESCryptoServiceProvider.cs
- EllipseGeometry.cs
- InputBindingCollection.cs
- CodeDelegateCreateExpression.cs
- LineBreakRecord.cs
- altserialization.cs
- FormatVersion.cs
- AuthenticationModuleElement.cs
- XmlAttributeOverrides.cs
- CompositeDuplexElement.cs
- BitmapMetadata.cs
- HttpFileCollection.cs
- PenLineJoinValidation.cs
- InfoCardXmlSerializer.cs
- SQLUtility.cs
- TableCellAutomationPeer.cs
- SystemWebExtensionsSectionGroup.cs
- EntityReference.cs
- InstanceCreationEditor.cs
- DuplicateWaitObjectException.cs
- CompilationPass2Task.cs