Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Structures / ConstantSlot.cs / 1 / ConstantSlot.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Data.Mapping.ViewGeneration.CqlGeneration; using System.Collections.Generic; using System.Text; using System.Diagnostics; namespace System.Data.Mapping.ViewGeneration.Structures { // A constant that can be projected in a cell query internal class ConstantSlot : ProjectedSlot { #region Constructors // effects: Creates a slot with constant value being "value" internal ConstantSlot(CellConstant value) { Debug.Assert(value != null); m_constant = value; Debug.Assert(value.IsNotNull() == false, "Cannot store NotNull in a slot - NotNull is only for conditions"); } #endregion #region Fields private CellConstant m_constant; // The actual value #endregion #region Properties // effects: Returns the value stored in this constant internal CellConstant CellConstant { get {return m_constant;} } #endregion #region ProjectedSlot Members internal override ProjectedSlot MakeAliasedSlot(CqlBlock block, MemberPath memberPath, int slotNum) { return this; // Nothing to create } internal override ProjectedSlot RemapSlot(Dictionaryremap) { return this; // No remapping needed } internal override StringBuilder AsCql(StringBuilder builder, MemberPath outputMember, string blockAlias, int indentLevel) { return m_constant.AsCql(builder, outputMember, blockAlias); } protected override bool IsEqualTo(ProjectedSlot right) { ConstantSlot rightSlot = right as ConstantSlot; if (rightSlot == null) { return false; } return CellConstant.EqualityComparer.Equals(m_constant, rightSlot.m_constant); } protected override int GetHash() { return CellConstant.EqualityComparer.GetHashCode(m_constant); } #endregion internal override void ToCompactString(StringBuilder builder) { m_constant.ToCompactString(builder); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Data.Mapping.ViewGeneration.CqlGeneration; using System.Collections.Generic; using System.Text; using System.Diagnostics; namespace System.Data.Mapping.ViewGeneration.Structures { // A constant that can be projected in a cell query internal class ConstantSlot : ProjectedSlot { #region Constructors // effects: Creates a slot with constant value being "value" internal ConstantSlot(CellConstant value) { Debug.Assert(value != null); m_constant = value; Debug.Assert(value.IsNotNull() == false, "Cannot store NotNull in a slot - NotNull is only for conditions"); } #endregion #region Fields private CellConstant m_constant; // The actual value #endregion #region Properties // effects: Returns the value stored in this constant internal CellConstant CellConstant { get {return m_constant;} } #endregion #region ProjectedSlot Members internal override ProjectedSlot MakeAliasedSlot(CqlBlock block, MemberPath memberPath, int slotNum) { return this; // Nothing to create } internal override ProjectedSlot RemapSlot(Dictionaryremap) { return this; // No remapping needed } internal override StringBuilder AsCql(StringBuilder builder, MemberPath outputMember, string blockAlias, int indentLevel) { return m_constant.AsCql(builder, outputMember, blockAlias); } protected override bool IsEqualTo(ProjectedSlot right) { ConstantSlot rightSlot = right as ConstantSlot; if (rightSlot == null) { return false; } return CellConstant.EqualityComparer.Equals(m_constant, rightSlot.m_constant); } protected override int GetHash() { return CellConstant.EqualityComparer.GetHashCode(m_constant); } #endregion internal override void ToCompactString(StringBuilder builder) { m_constant.ToCompactString(builder); } } } // 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
- ServiceThrottlingElement.cs
- Vector3DKeyFrameCollection.cs
- Span.cs
- ExpressionBuilderCollection.cs
- ImageIndexEditor.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- DataGridViewRowCollection.cs
- CodeExporter.cs
- ColumnProvider.cs
- XmlDataSourceView.cs
- EdmConstants.cs
- XmlnsDictionary.cs
- SqlBulkCopy.cs
- XsdBuildProvider.cs
- SystemIPGlobalProperties.cs
- FacetEnabledSchemaElement.cs
- MissingMemberException.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- EntityViewContainer.cs
- SchemaElement.cs
- SequentialWorkflowHeaderFooter.cs
- XPathArrayIterator.cs
- CharKeyFrameCollection.cs
- SafeNativeMemoryHandle.cs
- SqlStream.cs
- ObjectDataSourceSelectingEventArgs.cs
- Content.cs
- UseManagedPresentationBindingElement.cs
- KerberosReceiverSecurityToken.cs
- ProcessManager.cs
- ButtonStandardAdapter.cs
- DispatchChannelSink.cs
- TextBoxDesigner.cs
- ControlValuePropertyAttribute.cs
- EDesignUtil.cs
- EntityDataSourceChangingEventArgs.cs
- WaitingCursor.cs
- VisualBasicSettingsHandler.cs
- InkCanvasInnerCanvas.cs
- JumpTask.cs
- DirectoryInfo.cs
- DetailsViewModeEventArgs.cs
- TextReader.cs
- NavigateEvent.cs
- WebEncodingValidator.cs
- MsmqHostedTransportConfiguration.cs
- SplitterDesigner.cs
- DictionaryChange.cs
- ConvertersCollection.cs
- FixedPage.cs
- FormViewPageEventArgs.cs
- TableChangeProcessor.cs
- DragDropManager.cs
- FrugalList.cs
- ApplicationId.cs
- AddValidationError.cs
- DataGridViewCellValidatingEventArgs.cs
- SystemBrushes.cs
- CacheModeConverter.cs
- SystemIPAddressInformation.cs
- RuntimeWrappedException.cs
- SmiRecordBuffer.cs
- Internal.cs
- TrackBar.cs
- RowType.cs
- VariantWrapper.cs
- RemoteWebConfigurationHostStream.cs
- AmbiguousMatchException.cs
- FontEmbeddingManager.cs
- HostedTcpTransportManager.cs
- StructuralComparisons.cs
- _NestedSingleAsyncResult.cs
- Operator.cs
- ToolStripDropDownClosingEventArgs.cs
- SoapAttributeOverrides.cs
- SmtpSection.cs
- DbFunctionCommandTree.cs
- SpeechRecognizer.cs
- UInt32Converter.cs
- ByteArrayHelperWithString.cs
- LinkedList.cs
- DesignerTransaction.cs
- coordinatorfactory.cs
- WSUtilitySpecificationVersion.cs
- ListViewItemMouseHoverEvent.cs
- TemplatedMailWebEventProvider.cs
- ObjectDataProvider.cs
- PathFigureCollection.cs
- SelectionRange.cs
- ProcessStartInfo.cs
- DbProviderFactoriesConfigurationHandler.cs
- InternalBase.cs
- xmlformatgeneratorstatics.cs
- MethodRental.cs
- FileNotFoundException.cs
- SiblingIterators.cs
- AppSettingsSection.cs
- EmptyWorkItem.cs
- controlskin.cs
- XmlIterators.cs