Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Structures / CaseStatementSlot.cs / 2 / CaseStatementSlot.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System.Data.Mapping.ViewGeneration.CqlGeneration;
using System.Text;
using System.Collections.Generic;
namespace System.Data.Mapping.ViewGeneration.Structures
{
// This class is just a wrapper over case statements so that we don't
// pollute the CaseStatement class itself
internal class CaseStatementSlot : ProjectedSlot
{
#region Constructor
// effects: Creates a slot for statement
internal CaseStatementSlot(CaseStatement statement, IEnumerable withStatements)
{
m_caseStatement = statement;
m_withStatements = withStatements;
}
#endregion
#region Fields
private CaseStatement m_caseStatement; // The actual case statement
private IEnumerable m_withStatements;
#endregion
#region Methods
internal override ProjectedSlot MakeAliasedSlot(CqlBlock block, MemberPath outputPath, int slotNum)
{
CaseStatement newStatement = m_caseStatement.MakeCaseWithAliasedSlots(block, outputPath, slotNum);
return new CaseStatementSlot(newStatement, null);
}
internal override StringBuilder AsCql(StringBuilder builder, MemberPath outputMember,
string blockAlias, int indentLevel)
{
m_caseStatement.AsCql(builder, m_withStatements, blockAlias, indentLevel);
return builder;
}
internal override void ToCompactString(StringBuilder builder)
{
m_caseStatement.ToCompactString(builder);
}
#endregion
}
}
// 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.Text;
using System.Collections.Generic;
namespace System.Data.Mapping.ViewGeneration.Structures
{
// This class is just a wrapper over case statements so that we don't
// pollute the CaseStatement class itself
internal class CaseStatementSlot : ProjectedSlot
{
#region Constructor
// effects: Creates a slot for statement
internal CaseStatementSlot(CaseStatement statement, IEnumerable withStatements)
{
m_caseStatement = statement;
m_withStatements = withStatements;
}
#endregion
#region Fields
private CaseStatement m_caseStatement; // The actual case statement
private IEnumerable m_withStatements;
#endregion
#region Methods
internal override ProjectedSlot MakeAliasedSlot(CqlBlock block, MemberPath outputPath, int slotNum)
{
CaseStatement newStatement = m_caseStatement.MakeCaseWithAliasedSlots(block, outputPath, slotNum);
return new CaseStatementSlot(newStatement, null);
}
internal override StringBuilder AsCql(StringBuilder builder, MemberPath outputMember,
string blockAlias, int indentLevel)
{
m_caseStatement.AsCql(builder, m_withStatements, blockAlias, indentLevel);
return builder;
}
internal override void ToCompactString(StringBuilder builder)
{
m_caseStatement.ToCompactString(builder);
}
#endregion
}
}
// 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
- GeometryModel3D.cs
- AppSettingsReader.cs
- ProjectionNode.cs
- ThreadAbortException.cs
- BlobPersonalizationState.cs
- DocumentSequence.cs
- cookiecollection.cs
- StylusButtonCollection.cs
- BrowserTree.cs
- FileUtil.cs
- ControlType.cs
- XdrBuilder.cs
- BitmapInitialize.cs
- MessageAction.cs
- QilValidationVisitor.cs
- HttpServerUtilityBase.cs
- XmlBufferReader.cs
- Slider.cs
- PathSegment.cs
- ListViewSelectEventArgs.cs
- ArgIterator.cs
- WebResourceAttribute.cs
- RijndaelManaged.cs
- SqlDataRecord.cs
- SqlColumnizer.cs
- SecurityTokenTypes.cs
- MsmqAuthenticationMode.cs
- ImageConverter.cs
- CodeSubDirectoriesCollection.cs
- Thread.cs
- ReadOnlyNameValueCollection.cs
- Slider.cs
- PkcsUtils.cs
- Group.cs
- RawStylusInput.cs
- AppDomainAttributes.cs
- _KerberosClient.cs
- TypeConverterValueSerializer.cs
- BinaryNegotiation.cs
- ServiceEndpointCollection.cs
- ISFTagAndGuidCache.cs
- AnimationStorage.cs
- BaseCodePageEncoding.cs
- ManualResetEventSlim.cs
- EditorBrowsableAttribute.cs
- GeneralTransformGroup.cs
- MultiPropertyDescriptorGridEntry.cs
- ChildrenQuery.cs
- FunctionParameter.cs
- ObjectListComponentEditor.cs
- ModuleElement.cs
- PEFileEvidenceFactory.cs
- GridViewUpdateEventArgs.cs
- TableSectionStyle.cs
- FolderBrowserDialog.cs
- ContentFilePart.cs
- HostedHttpTransportManager.cs
- SecureConversationServiceElement.cs
- UnsafeNativeMethods.cs
- DataGridViewBand.cs
- UshortList2.cs
- NativeRightsManagementAPIsStructures.cs
- RectConverter.cs
- StdValidatorsAndConverters.cs
- RepeaterItem.cs
- DataGridRowAutomationPeer.cs
- WebConfigurationFileMap.cs
- UnsupportedPolicyOptionsException.cs
- ComboBoxDesigner.cs
- MissingMethodException.cs
- QilList.cs
- ElapsedEventArgs.cs
- RevocationPoint.cs
- DataServiceHostFactory.cs
- PasswordRecovery.cs
- ComponentSerializationService.cs
- ContentOperations.cs
- WebEventTraceProvider.cs
- HttpCapabilitiesBase.cs
- PagerSettings.cs
- LogicalExpr.cs
- ComponentTray.cs
- ItemCollection.cs
- ThreadSafeList.cs
- TransformValueSerializer.cs
- ValidationHelper.cs
- SelectionHighlightInfo.cs
- CharacterHit.cs
- PerformanceCounterManager.cs
- XmlLoader.cs
- PageParser.cs
- Matrix.cs
- activationcontext.cs
- StateFinalizationDesigner.cs
- TabControl.cs
- Setter.cs
- GridSplitter.cs
- OperatingSystem.cs
- QueryExpr.cs
- MetafileHeader.cs