Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- StateMachineSubscription.cs
- IntSecurity.cs
- SqlUserDefinedAggregateAttribute.cs
- ResXDataNode.cs
- ExtensionDataReader.cs
- FixedTextBuilder.cs
- LinkTarget.cs
- Validator.cs
- ActivityAction.cs
- ImageBrush.cs
- MSAAWinEventWrap.cs
- ReadOnlyDictionary.cs
- BrowserCapabilitiesFactoryBase.cs
- ListViewTableRow.cs
- PathGeometry.cs
- ReflectionTypeLoadException.cs
- XMLDiffLoader.cs
- CompositeFontFamily.cs
- SrgsDocumentParser.cs
- SplitterPanel.cs
- PageAdapter.cs
- WorkflowPersistenceService.cs
- XmlTypeMapping.cs
- LinqDataSourceSelectEventArgs.cs
- DescriptionAttribute.cs
- SqlMethodTransformer.cs
- Command.cs
- DataGridViewButtonCell.cs
- XmlIgnoreAttribute.cs
- PageAdapter.cs
- DispatchProxy.cs
- AssemblyAttributes.cs
- Line.cs
- OdbcConnectionStringbuilder.cs
- QueryStringParameter.cs
- AssociationSetMetadata.cs
- RtfControls.cs
- WebPartConnectVerb.cs
- MappingModelBuildProvider.cs
- SystemWebExtensionsSectionGroup.cs
- AssemblyAttributes.cs
- HttpFileCollection.cs
- CatalogPartChrome.cs
- ListControl.cs
- ItemsPresenter.cs
- Win32SafeHandles.cs
- SvcFileManager.cs
- MembershipValidatePasswordEventArgs.cs
- SpanIndex.cs
- PackageFilter.cs
- DbProviderFactories.cs
- TextTrailingWordEllipsis.cs
- PathBox.cs
- InvalidPipelineStoreException.cs
- Utils.cs
- ReadOnlyHierarchicalDataSourceView.cs
- ConfigurationLocation.cs
- X509Certificate.cs
- ContainerActivationHelper.cs
- FilteredDataSetHelper.cs
- TraceSwitch.cs
- DataObject.cs
- TdsParserHelperClasses.cs
- CollectionBase.cs
- DoubleLinkListEnumerator.cs
- SourceFileInfo.cs
- InputManager.cs
- ImageIndexEditor.cs
- ReadOnlyHierarchicalDataSource.cs
- Decorator.cs
- OrCondition.cs
- MD5Cng.cs
- TextSearch.cs
- ObjectListTitleAttribute.cs
- BulletedListEventArgs.cs
- shaper.cs
- ConfigurationValues.cs
- BrowserCapabilitiesCompiler.cs
- SourceSwitch.cs
- Evidence.cs
- ColorConvertedBitmap.cs
- PenThreadPool.cs
- GridViewHeaderRowPresenter.cs
- ZipIORawDataFileBlock.cs
- PtsContext.cs
- MaterialCollection.cs
- EDesignUtil.cs
- ImageDrawing.cs
- ScriptResourceAttribute.cs
- WebSysDescriptionAttribute.cs
- ContravarianceAdapter.cs
- TextViewSelectionProcessor.cs
- MediaEntryAttribute.cs
- _LocalDataStore.cs
- SocketException.cs
- ExternalFile.cs
- XamlToRtfWriter.cs
- ContainerFilterService.cs
- DataException.cs
- ListenerBinder.cs