Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / LocalIdCollection.cs / 1 / LocalIdCollection.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace Microsoft.InfoCards
{
using System;
using System.Collections.Generic;
//
// Summary:
// The collection of LocalIds used during search operations.
//
// Remarks:
// This is for internal store use only.
//
internal class LocalIdCollection
{
SortedList m_inner;
public LocalIdCollection()
{
m_inner = new SortedList();
}
//
// Summary:
// Adds an item to the list to the correct spot in the list.
// Parameters:
// item: The value to add to the list
//
public void Add( int item )
{
if( !m_inner.ContainsKey( item ) )
{
m_inner.Add( item, item );
}
}
public void Clear()
{
m_inner.Clear();
}
public int Count
{
get { return m_inner.Count; }
}
//
// Summary:
// Filters the current list of localIds,
//
// Remarks:
// Opearation is O(n)
//
// Parameters:
// itemsToKeep: the list of items not to remove from the list.
//
//
public void Filter( LocalIdCollection itemsToKeep )
{
int count = m_inner.Count;
for( int i = count - 1; i >=0; i-- )
{
if( !itemsToKeep.m_inner.ContainsKey( m_inner.Keys[i] ) )
{
m_inner.RemoveAt( i );
}
}
}
public IList Keys
{
get { return m_inner.Keys; }
}
//
}
}
// 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
- BaseCodeDomTreeGenerator.cs
- IgnoreFlushAndCloseStream.cs
- ResourceContainer.cs
- RadioButton.cs
- InternalConfigHost.cs
- UIInitializationException.cs
- ErrorHandlingReceiver.cs
- FlowPosition.cs
- SqlConnectionStringBuilder.cs
- XmlWrappingReader.cs
- ImmutableCollection.cs
- ContentOperations.cs
- WebBrowserProgressChangedEventHandler.cs
- FontDialog.cs
- CustomLineCap.cs
- GenericTypeParameterConverter.cs
- TypeBrowserDialog.cs
- GeometryGroup.cs
- ProtocolsConfiguration.cs
- ApplicationCommands.cs
- WorkflowInstanceProxy.cs
- ExclusiveHandle.cs
- CompensatableSequenceActivity.cs
- DisplayNameAttribute.cs
- StylusPointPropertyInfoDefaults.cs
- XamlParser.cs
- ITreeGenerator.cs
- FileStream.cs
- wgx_sdk_version.cs
- EncoderParameters.cs
- DataGridViewCellValueEventArgs.cs
- TdsEnums.cs
- DoubleStorage.cs
- HttpCapabilitiesEvaluator.cs
- X509CertificateValidator.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- ListViewItem.cs
- TimerElapsedEvenArgs.cs
- util.cs
- UnaryNode.cs
- CodeIterationStatement.cs
- TagPrefixInfo.cs
- MenuTracker.cs
- ClientConfigurationSystem.cs
- ComponentChangingEvent.cs
- DataSourceCache.cs
- XPathNode.cs
- HttpCachePolicyWrapper.cs
- TableCell.cs
- BaseValidatorDesigner.cs
- JsonDataContract.cs
- TraceSection.cs
- MessageDirection.cs
- DataGridViewRowConverter.cs
- RegexMatch.cs
- DataListItem.cs
- SplitterPanel.cs
- _TransmitFileOverlappedAsyncResult.cs
- ReadOnlyHierarchicalDataSourceView.cs
- BasicSecurityProfileVersion.cs
- DBSqlParserTableCollection.cs
- SqlDelegatedTransaction.cs
- StylusPointPropertyInfoDefaults.cs
- EventLogSession.cs
- ContentDisposition.cs
- SiteMapDesignerDataSourceView.cs
- AppDomainGrammarProxy.cs
- PageTheme.cs
- ButtonBaseAdapter.cs
- TimestampInformation.cs
- RightsManagementEncryptionTransform.cs
- ErrorCodes.cs
- PointAnimationClockResource.cs
- ObjectViewEntityCollectionData.cs
- FilteredReadOnlyMetadataCollection.cs
- Matrix.cs
- Panel.cs
- WorkItem.cs
- StringBlob.cs
- NumberFormatter.cs
- CodeCatchClauseCollection.cs
- PowerModeChangedEventArgs.cs
- ObjectHandle.cs
- ModifiableIteratorCollection.cs
- ColorBlend.cs
- CachedPathData.cs
- RuntimeWrappedException.cs
- ToolStripPanelRenderEventArgs.cs
- FixedFlowMap.cs
- WindowsMenu.cs
- WorkflowOperationFault.cs
- Vector3DValueSerializer.cs
- OutOfProcStateClientManager.cs
- TokenBasedSet.cs
- SqlDataSourceSelectingEventArgs.cs
- MergeLocalizationDirectives.cs
- RemotingSurrogateSelector.cs
- ResourceReferenceExpressionConverter.cs
- PartitionResolver.cs
- CombinedGeometry.cs