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
- ToolStripStatusLabel.cs
- DataFieldCollectionEditor.cs
- Aes.cs
- AssemblyResourceLoader.cs
- EventLogger.cs
- InfiniteIntConverter.cs
- CacheModeConverter.cs
- DesignerDataColumn.cs
- DesignerRegion.cs
- CodeSnippetTypeMember.cs
- GroupBox.cs
- RemoveFromCollection.cs
- SqlRemoveConstantOrderBy.cs
- ConfigXmlDocument.cs
- TogglePattern.cs
- RightsManagementInformation.cs
- CompensatableTransactionScopeActivity.cs
- SqlProviderServices.cs
- BinaryReader.cs
- XsdCachingReader.cs
- TreeNodeSelectionProcessor.cs
- ConnectionOrientedTransportElement.cs
- ProcessModelSection.cs
- VBCodeProvider.cs
- UnsafeNativeMethods.cs
- AmbientValueAttribute.cs
- UniqueEventHelper.cs
- MD5.cs
- InplaceBitmapMetadataWriter.cs
- EdgeProfileValidation.cs
- EntityDataSource.cs
- HttpPostedFile.cs
- RelatedImageListAttribute.cs
- IndexExpression.cs
- AdornerHitTestResult.cs
- GenerateScriptTypeAttribute.cs
- ValueUtilsSmi.cs
- ProcessModule.cs
- Point3DAnimationBase.cs
- TouchesOverProperty.cs
- RemotingHelper.cs
- ImageCodecInfo.cs
- ImportedNamespaceContextItem.cs
- InputScope.cs
- UrlMappingCollection.cs
- XmlNodeList.cs
- XmlDictionaryWriter.cs
- DispatcherTimer.cs
- SystemWebCachingSectionGroup.cs
- TableCell.cs
- MinMaxParagraphWidth.cs
- FileDialogCustomPlaces.cs
- ScrollContentPresenter.cs
- ClientRuntime.cs
- MailSettingsSection.cs
- AttachmentCollection.cs
- ConnectionConsumerAttribute.cs
- CustomPopupPlacement.cs
- InfoCardServiceInstallComponent.cs
- InputGestureCollection.cs
- CodeObjectCreateExpression.cs
- WindowsRebar.cs
- RoleGroupCollection.cs
- OleDbEnumerator.cs
- UIElementParaClient.cs
- TypeSystem.cs
- CallTemplateAction.cs
- XPathAxisIterator.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- PersonalizationProviderHelper.cs
- EventRecordWrittenEventArgs.cs
- ExecutionScope.cs
- KeyFrames.cs
- DbConnectionStringCommon.cs
- ComponentGlyph.cs
- Enum.cs
- ToolStripDesignerAvailabilityAttribute.cs
- DataViewManagerListItemTypeDescriptor.cs
- SqlNotificationEventArgs.cs
- CommonGetThemePartSize.cs
- MouseGestureConverter.cs
- MetadataCache.cs
- ContentHostHelper.cs
- odbcmetadatacollectionnames.cs
- ColorConvertedBitmap.cs
- EntityDataSourceMemberPath.cs
- PropertyIDSet.cs
- Int32Converter.cs
- ContainerSelectorBehavior.cs
- SessionEndingCancelEventArgs.cs
- FirewallWrapper.cs
- Int32CAMarshaler.cs
- isolationinterop.cs
- ChangesetResponse.cs
- ConsoleTraceListener.cs
- XPathNavigatorReader.cs
- SingleConverter.cs
- RowType.cs
- CSharpCodeProvider.cs
- AssociationTypeEmitter.cs