Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------- //// 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
- HtmlTextViewAdapter.cs
- ForEach.cs
- PropertyGridView.cs
- TextEndOfParagraph.cs
- ColorConvertedBitmap.cs
- loginstatus.cs
- MetadataItemCollectionFactory.cs
- AssemblyAttributesGoHere.cs
- DeflateStream.cs
- AlphabeticalEnumConverter.cs
- followingquery.cs
- CollectionTypeElement.cs
- ByteStream.cs
- DataPagerFieldItem.cs
- FigureParagraph.cs
- LinqExpressionNormalizer.cs
- EntitySqlQueryCacheEntry.cs
- XmlSignatureManifest.cs
- StylusPlugin.cs
- followingquery.cs
- WebPartMinimizeVerb.cs
- WsdlExporter.cs
- HelpKeywordAttribute.cs
- SingleStorage.cs
- COM2Properties.cs
- AudioBase.cs
- CompatibleIComparer.cs
- ConnectionStringsSection.cs
- SQLResource.cs
- Module.cs
- XpsDigitalSignature.cs
- XsltLibrary.cs
- DataColumn.cs
- GenericWebPart.cs
- ToolStripScrollButton.cs
- BlockUIContainer.cs
- AutomationAttributeInfo.cs
- DeliveryStrategy.cs
- _UriSyntax.cs
- FileDialogCustomPlacesCollection.cs
- ExternalFile.cs
- XmlSchemaSimpleContent.cs
- TransactionBridge.cs
- SymmetricKey.cs
- NumberSubstitution.cs
- WebRequestModulesSection.cs
- PropertyKey.cs
- DataGridAutomationPeer.cs
- Html32TextWriter.cs
- TypeBuilder.cs
- FormatterServices.cs
- DataViewListener.cs
- HebrewCalendar.cs
- FileDialogPermission.cs
- SQLDouble.cs
- SQLInt32Storage.cs
- DataTableMappingCollection.cs
- Point3DIndependentAnimationStorage.cs
- TranslateTransform3D.cs
- AttributeTableBuilder.cs
- PointF.cs
- CultureSpecificCharacterBufferRange.cs
- RankException.cs
- MetadataPropertyCollection.cs
- AsymmetricCryptoHandle.cs
- BaseCodePageEncoding.cs
- TargetException.cs
- FileVersionInfo.cs
- RunClient.cs
- DetailsViewUpdatedEventArgs.cs
- SimpleHandlerBuildProvider.cs
- TextEditorLists.cs
- XmlReaderDelegator.cs
- TraceSource.cs
- Selector.cs
- ReadOnlyDictionary.cs
- HttpWriter.cs
- IconConverter.cs
- CommandLineParser.cs
- RequestSecurityTokenForGetBrowserToken.cs
- TaskFormBase.cs
- CodeGeneratorOptions.cs
- GenericWebPart.cs
- ColorTranslator.cs
- RangeBase.cs
- ActiveXHelper.cs
- RenameRuleObjectDialog.Designer.cs
- ExternalFile.cs
- UrlAuthorizationModule.cs
- OdbcException.cs
- AccessibleObject.cs
- RulePatternOps.cs
- SplineQuaternionKeyFrame.cs
- CounterSetInstanceCounterDataSet.cs
- DataRecordInfo.cs
- SqlConnection.cs
- MdiWindowListStrip.cs
- PropertyEntry.cs
- TableAdapterManagerGenerator.cs
- ProjectionCamera.cs