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
- complextypematerializer.cs
- Stroke2.cs
- Operand.cs
- ValidationPropertyAttribute.cs
- ExceptionCollection.cs
- XsltLibrary.cs
- DesignerAttribute.cs
- xsdvalidator.cs
- RightsManagementPermission.cs
- WinFormsComponentEditor.cs
- QueryOutputWriter.cs
- Subset.cs
- sqlser.cs
- LinqDataSourceDeleteEventArgs.cs
- lengthconverter.cs
- ObjectDataSourceDisposingEventArgs.cs
- DbParameterHelper.cs
- ThreadStartException.cs
- HtmlInputImage.cs
- RemoteArgument.cs
- StyleSelector.cs
- WindowsToolbarItemAsMenuItem.cs
- DbXmlEnabledProviderManifest.cs
- UpdatePanelControlTrigger.cs
- ManifestResourceInfo.cs
- HtmlImage.cs
- DataList.cs
- control.ime.cs
- OleDbReferenceCollection.cs
- DbMetaDataColumnNames.cs
- MinimizableAttributeTypeConverter.cs
- FontTypeConverter.cs
- MatrixConverter.cs
- BindingOperations.cs
- EntitySqlQueryState.cs
- SqlOuterApplyReducer.cs
- TimelineGroup.cs
- MenuItem.cs
- HtmlTernaryTree.cs
- BaseHashHelper.cs
- FastEncoder.cs
- TableLayoutStyleCollection.cs
- LoginView.cs
- EdgeModeValidation.cs
- CheckBoxAutomationPeer.cs
- EntityContainerRelationshipSetEnd.cs
- Int32RectValueSerializer.cs
- ListViewTableRow.cs
- EditorPartChrome.cs
- DrawingCollection.cs
- EmptyElement.cs
- PointLightBase.cs
- UnsafeNativeMethodsMilCoreApi.cs
- SQLSingle.cs
- TextBoxAutomationPeer.cs
- MaskedTextProvider.cs
- Thickness.cs
- Guid.cs
- SoapSchemaImporter.cs
- DataTemplateSelector.cs
- SimpleTextLine.cs
- DesignerTextBoxAdapter.cs
- FamilyTypefaceCollection.cs
- PropertyChangingEventArgs.cs
- ListBox.cs
- PrintControllerWithStatusDialog.cs
- ExceptionHandlerDesigner.cs
- AmbientProperties.cs
- DataConnectionHelper.cs
- Model3D.cs
- SqlAliasesReferenced.cs
- SortedDictionary.cs
- DataListComponentEditor.cs
- CustomDictionarySources.cs
- PlainXmlSerializer.cs
- DynamicEntity.cs
- SequentialWorkflowHeaderFooter.cs
- ScriptControl.cs
- AttachmentCollection.cs
- InternalCache.cs
- ContextStack.cs
- Emitter.cs
- ImageListStreamer.cs
- EditorZone.cs
- WindowsUpDown.cs
- SendingRequestEventArgs.cs
- XmlQueryCardinality.cs
- RuntimeResourceSet.cs
- ComboBoxItem.cs
- PropertyMap.cs
- ResourceManager.cs
- SoapExtensionImporter.cs
- InputProcessorProfilesLoader.cs
- RegisteredScript.cs
- DataGridSortCommandEventArgs.cs
- TableProvider.cs
- ReflectionPermission.cs
- Solver.cs
- APCustomTypeDescriptor.cs
- FileDialog.cs