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
- ListSortDescription.cs
- LambdaCompiler.Logical.cs
- JsonWriter.cs
- DependencyObjectType.cs
- MemberInfoSerializationHolder.cs
- RectValueSerializer.cs
- GlobalizationSection.cs
- CodeEntryPointMethod.cs
- RefreshPropertiesAttribute.cs
- AdornedElementPlaceholder.cs
- ElasticEase.cs
- ExplicitDiscriminatorMap.cs
- QueryOutputWriter.cs
- XamlTypeMapper.cs
- ClaimComparer.cs
- RawTextInputReport.cs
- ScrollViewerAutomationPeer.cs
- TextUtf8RawTextWriter.cs
- InheritablePropertyChangeInfo.cs
- ActionFrame.cs
- DateTimeConverter.cs
- X509Utils.cs
- TableRow.cs
- TrustManagerMoreInformation.cs
- GridItem.cs
- QueryableDataSourceHelper.cs
- BindingValueChangedEventArgs.cs
- SerialStream.cs
- BitArray.cs
- DtcInterfaces.cs
- EntityViewContainer.cs
- GridLength.cs
- GenericTextProperties.cs
- FunctionCommandText.cs
- EntityViewGenerationAttribute.cs
- LinqDataSourceSelectEventArgs.cs
- ImmutableObjectAttribute.cs
- AccessibleObject.cs
- ChannelBinding.cs
- HostingEnvironment.cs
- Column.cs
- ActivityCodeGenerator.cs
- ValidationSummary.cs
- DataGridViewComboBoxColumn.cs
- ListBoxItem.cs
- SiteMembershipCondition.cs
- RequestCacheEntry.cs
- RadioButtonBaseAdapter.cs
- HealthMonitoringSection.cs
- DesignTimeTemplateParser.cs
- PolyLineSegmentFigureLogic.cs
- DataGridParentRows.cs
- NullExtension.cs
- RtfControlWordInfo.cs
- DataServiceResponse.cs
- Matrix3DConverter.cs
- CaretElement.cs
- SqlConnectionHelper.cs
- ListenerConfig.cs
- UIElementIsland.cs
- PropertyMappingExceptionEventArgs.cs
- WorkflowElementDialog.cs
- ColorPalette.cs
- PersonalizationProviderHelper.cs
- TimeSpanOrInfiniteValidator.cs
- BulletedListEventArgs.cs
- Event.cs
- Wildcard.cs
- BatchWriter.cs
- basenumberconverter.cs
- GlyphShapingProperties.cs
- DependencyObjectProvider.cs
- ProtectedConfigurationSection.cs
- SymbolMethod.cs
- KeyConverter.cs
- ObjectKeyFrameCollection.cs
- CacheVirtualItemsEvent.cs
- RayMeshGeometry3DHitTestResult.cs
- GACMembershipCondition.cs
- SqlRecordBuffer.cs
- Int32Collection.cs
- UnmanagedMemoryStream.cs
- QilDataSource.cs
- ChannelTracker.cs
- StateChangeEvent.cs
- ObjectStateEntryDbDataRecord.cs
- arc.cs
- PageAsyncTaskManager.cs
- TextWriterTraceListener.cs
- ValueTable.cs
- DateRangeEvent.cs
- FixedSOMTableRow.cs
- ParseNumbers.cs
- TabRenderer.cs
- TextStore.cs
- ToolStripStatusLabel.cs
- Expressions.cs
- DataListDesigner.cs
- ArrayWithOffset.cs
- TemplateBindingExtensionConverter.cs