Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / QueryParameter.cs / 1 / QueryParameter.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace Microsoft.InfoCards
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace;
//
// Summary:
// Maps a set of values to an index name for use in queries.
//
internal class QueryParameter
{
string m_indexName;
List m_objects;
//
// Summary:
// Constructs a new instance of the QueryParameter using
// the specified name.
//
// Parameters:
// name: the name of the index to use.
//
public QueryParameter( string name )
{
if( String.IsNullOrEmpty( name ) )
throw IDT.ThrowHelperArgumentNull( "name" );
m_indexName = name;
m_objects = new List( );
}
//
// Summary:
// Constructs a new instance of the QueryParameter using
// the specified name and values.
//
// Remarks:
// each item in this array get its own index entry.
//
// Parameters:
// name: the name of the index to use.
// values: the array of values to create match entries
//
public QueryParameter( string name, params object[] values )
: this( name )
{
for( int i = 0; i < values.Length; i++ )
AddMatch( values[i] );
}
//
// Summary:
// Gets the name of the index this Match will be performed against.
//
public string IndexName
{
get { return m_indexName; }
internal set{ m_indexName = value; }
}
//
// Summary:
// Gets the index object that wrapps the entry.
//
// Remarks:
// For internal store use only
//
internal IndexObject this[ int index ]
{
get{ return m_objects[ index ]; }
}
//
// Summary:
// Gets the count of indexObjects contained
//
public int Count
{
get { return m_objects.Count; }
}
//
// Summary:
// Clears the list of match values.
//
public void Clear()
{
m_objects.Clear();
}
//
// Summary:
// Adds the a precompiled index value to the list of matches.
//
// Paramters:
// compiledForm: Compiled index data.
//
public void AddCompiled( byte[] compiledForm )
{
m_objects.Add( new IndexObject( compiledForm ) );
}
//
// Summary:
// Adds the values specified as multiValue indexes
//
// Paramters:
// values: the array of values to add to the match entry
//
public void AddMatch( params object[] values )
{
if( null == values || 0 == values.Length )
throw IDT.ThrowHelperArgumentNull( "values" );
m_objects.Add( new IndexObject( values ) );
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CachedCompositeFamily.cs
- SystemException.cs
- NavigationService.cs
- TextDecorationCollection.cs
- XmlSchemaObjectCollection.cs
- Propagator.ExtentPlaceholderCreator.cs
- WebBrowsableAttribute.cs
- wgx_commands.cs
- DoubleCollectionConverter.cs
- QuaternionAnimationUsingKeyFrames.cs
- Predicate.cs
- TransactionScope.cs
- DataServiceConfiguration.cs
- ClassData.cs
- JumpTask.cs
- TextRunProperties.cs
- LayoutTable.cs
- CreateUserErrorEventArgs.cs
- WebSysDescriptionAttribute.cs
- CoreSwitches.cs
- HashAlgorithm.cs
- XmlLoader.cs
- IndexedString.cs
- TreeViewHitTestInfo.cs
- InstrumentationTracker.cs
- XmlDataCollection.cs
- ClientScriptItem.cs
- BinarySerializer.cs
- ExplicitDiscriminatorMap.cs
- EntityUtil.cs
- FormatVersion.cs
- PenLineCapValidation.cs
- WebServiceEnumData.cs
- TextTreeObjectNode.cs
- ThreadAbortException.cs
- CmsInterop.cs
- AdditionalEntityFunctions.cs
- WindowsAuthenticationModule.cs
- TextBoxLine.cs
- OdbcException.cs
- SqlNotificationRequest.cs
- TimeSpanValidator.cs
- ThreadInterruptedException.cs
- SqlDataSource.cs
- BmpBitmapEncoder.cs
- SafeProcessHandle.cs
- FixedSOMElement.cs
- GenericXmlSecurityToken.cs
- SafeNativeMethods.cs
- IntegerFacetDescriptionElement.cs
- DispatcherExceptionEventArgs.cs
- TransformerInfoCollection.cs
- InnerItemCollectionView.cs
- SchemaCollectionPreprocessor.cs
- InputReportEventArgs.cs
- AnnouncementEndpointElement.cs
- BrowserDefinitionCollection.cs
- GlyphElement.cs
- HttpBrowserCapabilitiesWrapper.cs
- NamedObject.cs
- CryptoConfig.cs
- WmpBitmapDecoder.cs
- Matrix.cs
- Menu.cs
- TraceSection.cs
- PackWebRequestFactory.cs
- SQLChars.cs
- XsltQilFactory.cs
- Simplifier.cs
- BinaryObjectReader.cs
- SHA1Cng.cs
- CustomTokenProvider.cs
- Math.cs
- RIPEMD160Managed.cs
- IdentityModelStringsVersion1.cs
- ProfilePropertySettings.cs
- GridViewHeaderRowPresenter.cs
- LoginCancelEventArgs.cs
- DatePickerDateValidationErrorEventArgs.cs
- WebColorConverter.cs
- PolyBezierSegment.cs
- ProcessModelInfo.cs
- ZipIOCentralDirectoryBlock.cs
- DependentList.cs
- Axis.cs
- SqlDataSourceWizardForm.cs
- ValidatedControlConverter.cs
- LinqDataSourceDeleteEventArgs.cs
- DispatchRuntime.cs
- StyleBamlRecordReader.cs
- Stack.cs
- SqlCacheDependencyDatabaseCollection.cs
- VectorAnimationBase.cs
- PointHitTestResult.cs
- ResumeStoryboard.cs
- DoubleAnimationUsingPath.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- NavigatorOutput.cs
- UrlMappingCollection.cs
- ScrollItemPattern.cs