Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Structures / ConstantProjectedSlot.cs / 1305376 / ConstantProjectedSlot.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 ConstantProjectedSlot : ProjectedSlot { #region Constructors // effects: Creates a slot with constant value being "value" internal ConstantProjectedSlot(Constant 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 Constant m_constant; // The actual value #endregion #region Properties // effects: Returns the value stored in this constant internal Constant 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 StringBuilder AsCql(StringBuilder builder, MemberPath outputMember, string blockAlias, int indentLevel) { return m_constant.AsCql(builder, outputMember, blockAlias); } protected override bool IsEqualTo(ProjectedSlot right) { ConstantProjectedSlot rightSlot = right as ConstantProjectedSlot; if (rightSlot == null) { return false; } return Constant.EqualityComparer.Equals(m_constant, rightSlot.m_constant); } protected override int GetHash() { return Constant.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
- DrawTreeNodeEventArgs.cs
- NotSupportedException.cs
- ConsoleTraceListener.cs
- RegexTypeEditor.cs
- codemethodreferenceexpression.cs
- PTManager.cs
- ReadOnlyCollectionBase.cs
- DataServiceBuildProvider.cs
- ToolStripDropDownMenu.cs
- ScriptReferenceBase.cs
- KeyEventArgs.cs
- AutoSizeToolBoxItem.cs
- SubMenuStyle.cs
- SystemResources.cs
- FormParameter.cs
- NullExtension.cs
- RoleManagerEventArgs.cs
- IISUnsafeMethods.cs
- BinaryObjectWriter.cs
- PixelFormats.cs
- AnchoredBlock.cs
- ColorConverter.cs
- JoinGraph.cs
- DrawingContextWalker.cs
- updateconfighost.cs
- ByteBufferPool.cs
- Menu.cs
- ConstantCheck.cs
- Version.cs
- TransformValueSerializer.cs
- WizardForm.cs
- InternalPermissions.cs
- InternalResources.cs
- AttributeConverter.cs
- DesignerSerializationVisibilityAttribute.cs
- WebEventTraceProvider.cs
- BevelBitmapEffect.cs
- ScrollEvent.cs
- ThrowHelper.cs
- MultiAsyncResult.cs
- COM2ComponentEditor.cs
- ApplicationBuildProvider.cs
- DbQueryCommandTree.cs
- BookmarkEventArgs.cs
- RightsManagementPermission.cs
- DesignerSerializationVisibilityAttribute.cs
- XmlSchemaAppInfo.cs
- Variable.cs
- AesCryptoServiceProvider.cs
- EnvironmentPermission.cs
- SystemIcmpV6Statistics.cs
- EnvelopedPkcs7.cs
- HttpServerVarsCollection.cs
- SortedDictionary.cs
- DetailsViewModeEventArgs.cs
- AttachedPropertyBrowsableAttribute.cs
- GeneralTransform3DGroup.cs
- XmlMtomWriter.cs
- PartitionResolver.cs
- ConnectionPoint.cs
- DataGridColumnHeadersPresenter.cs
- RegexParser.cs
- DesignerMetadata.cs
- Select.cs
- DataGridAutoFormatDialog.cs
- DispatcherTimer.cs
- MenuItemBinding.cs
- SQLSingle.cs
- DocumentPageView.cs
- XmlReader.cs
- SplashScreenNativeMethods.cs
- DataGridCell.cs
- ConfigurationManagerHelper.cs
- CapabilitiesPattern.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- AssemblyAttributesGoHere.cs
- GridViewDeletedEventArgs.cs
- SqlClientWrapperSmiStream.cs
- SystemParameters.cs
- Region.cs
- RoleService.cs
- DbParameterHelper.cs
- Pen.cs
- XamlInt32CollectionSerializer.cs
- DBCSCodePageEncoding.cs
- XmlSchemaObject.cs
- MdiWindowListItemConverter.cs
- IssuanceTokenProviderState.cs
- SqlDataSourceSummaryPanel.cs
- precedingsibling.cs
- WebServiceEnumData.cs
- HttpInputStream.cs
- EmptyEnumerator.cs
- WSSecurityPolicy11.cs
- ProcessHostFactoryHelper.cs
- FragmentNavigationEventArgs.cs
- DocumentEventArgs.cs
- PropertiesTab.cs
- IdnElement.cs
- PerformanceCounterPermissionEntry.cs