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
- ListItemCollection.cs
- Bezier.cs
- XsltLoader.cs
- ConfigurationLocationCollection.cs
- CoreSwitches.cs
- InstalledFontCollection.cs
- EntityDataSourceState.cs
- ToolStripDropTargetManager.cs
- Win32KeyboardDevice.cs
- XmlDataSourceNodeDescriptor.cs
- XmlSchemaNotation.cs
- UIElementAutomationPeer.cs
- PropertyGridView.cs
- SqlConnectionManager.cs
- BaseTemplateBuildProvider.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- DocumentViewerAutomationPeer.cs
- EdmSchemaError.cs
- ChannelEndpointElement.cs
- DataFormats.cs
- WmlMobileTextWriter.cs
- ParameterToken.cs
- ElementFactory.cs
- ParagraphVisual.cs
- HttpHandlersSection.cs
- ProxyAttribute.cs
- XmlDocument.cs
- DatePickerTextBox.cs
- MimeObjectFactory.cs
- HandleExceptionArgs.cs
- PathGradientBrush.cs
- PagesSection.cs
- WindowsFormsHostPropertyMap.cs
- RNGCryptoServiceProvider.cs
- SqlAliasesReferenced.cs
- MetadataPropertyCollection.cs
- documentsequencetextview.cs
- WmpBitmapDecoder.cs
- JournalEntryStack.cs
- RtfToXamlReader.cs
- HandledEventArgs.cs
- BatchStream.cs
- translator.cs
- EntityEntry.cs
- FileEnumerator.cs
- SafeBitVector32.cs
- NamespaceDecl.cs
- PeerNameRegistration.cs
- ActivityPreviewDesigner.cs
- SizeAnimation.cs
- RangeValidator.cs
- SoapTypeAttribute.cs
- CompilerScope.Storage.cs
- NotSupportedException.cs
- EditCommandColumn.cs
- OutputCacheSettingsSection.cs
- UnauthorizedAccessException.cs
- EventWaitHandleSecurity.cs
- RegexMatch.cs
- UnsafeNativeMethods.cs
- COAUTHIDENTITY.cs
- SqlTypeConverter.cs
- FlowchartDesigner.xaml.cs
- RectKeyFrameCollection.cs
- DbExpressionVisitor_TResultType.cs
- GlyphsSerializer.cs
- AppAction.cs
- EdmRelationshipRoleAttribute.cs
- SmtpException.cs
- SynchronizationValidator.cs
- Configuration.cs
- OdbcException.cs
- MeshGeometry3D.cs
- CustomAssemblyResolver.cs
- MLangCodePageEncoding.cs
- MaxSessionCountExceededException.cs
- DockAndAnchorLayout.cs
- ValueUnavailableException.cs
- FieldDescriptor.cs
- Faults.cs
- SByteStorage.cs
- PhoneCallDesigner.cs
- ClientFormsAuthenticationCredentials.cs
- SafeViewOfFileHandle.cs
- SystemWebExtensionsSectionGroup.cs
- precedingquery.cs
- EntityDataSourceWizardForm.cs
- XmlSchemaException.cs
- UInt16.cs
- OleDbConnection.cs
- CrossAppDomainChannel.cs
- StringConcat.cs
- ComplexTypeEmitter.cs
- ConfigurationProperty.cs
- PointLight.cs
- PasswordBoxAutomationPeer.cs
- HttpStreams.cs
- HasCopySemanticsAttribute.cs
- GroupItem.cs
- FrugalList.cs