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 { SortedListm_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
- DataBindingCollection.cs
- JoinTreeNode.cs
- XmlCustomFormatter.cs
- PropertyTab.cs
- Vector3DIndependentAnimationStorage.cs
- SatelliteContractVersionAttribute.cs
- WindowsListViewItemCheckBox.cs
- TypeUsageBuilder.cs
- ParameterModifier.cs
- RegexStringValidatorAttribute.cs
- Drawing.cs
- RadioButtonAutomationPeer.cs
- ExpressionConverter.cs
- SqlWriter.cs
- Boolean.cs
- Figure.cs
- ObjectViewEntityCollectionData.cs
- GraphicsPathIterator.cs
- StreamGeometryContext.cs
- TraceXPathNavigator.cs
- recordstate.cs
- SqlDataSourceFilteringEventArgs.cs
- RowParagraph.cs
- ActivationWorker.cs
- SocketAddress.cs
- XmlDataSourceView.cs
- WebPartDesigner.cs
- OLEDB_Util.cs
- FixedTextPointer.cs
- _Win32.cs
- HandlerMappingMemo.cs
- TextEncodedRawTextWriter.cs
- OpCopier.cs
- NonBatchDirectoryCompiler.cs
- HandlerFactoryCache.cs
- ComplexPropertyEntry.cs
- BamlReader.cs
- EndpointReference.cs
- HttpApplicationStateWrapper.cs
- GenericEnumConverter.cs
- MethodBuilder.cs
- Block.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- DiagnosticsConfigurationHandler.cs
- SessionEndingEventArgs.cs
- SecurityTokenProvider.cs
- MappingSource.cs
- WindowsSpinner.cs
- ParserOptions.cs
- MetadataArtifactLoaderCompositeFile.cs
- HttpCachePolicyElement.cs
- LocatorBase.cs
- WebHttpSecurityElement.cs
- ApplicationSecurityInfo.cs
- CultureInfo.cs
- BrowserCapabilitiesCompiler.cs
- CollectionTraceRecord.cs
- XmlSchemaSimpleTypeList.cs
- RectAnimationBase.cs
- BufferedReadStream.cs
- BooleanFacetDescriptionElement.cs
- ConnectionPoint.cs
- CreateRefExpr.cs
- ListViewItem.cs
- HandleCollector.cs
- SamlNameIdentifierClaimResource.cs
- DataGridViewCellParsingEventArgs.cs
- ChangeProcessor.cs
- BasicCommandTreeVisitor.cs
- VerificationException.cs
- Scene3D.cs
- FormatterServices.cs
- ActiveXHost.cs
- RootContext.cs
- PointCollectionValueSerializer.cs
- TextBoxBase.cs
- ContainerParagraph.cs
- ModuleBuilderData.cs
- DocumentReferenceCollection.cs
- AssemblyCache.cs
- SafePEFileHandle.cs
- EditorReuseAttribute.cs
- NullableFloatMinMaxAggregationOperator.cs
- AttributeCollection.cs
- PerfProviderCollection.cs
- StringCollection.cs
- Panel.cs
- TypeSystem.cs
- SortedList.cs
- WebGetAttribute.cs
- OleStrCAMarshaler.cs
- MergeLocalizationDirectives.cs
- HttpConfigurationContext.cs
- SerialReceived.cs
- FlowLayout.cs
- NativeObjectSecurity.cs
- FormsAuthenticationCredentials.cs
- EventBuilder.cs
- NonClientArea.cs
- TouchEventArgs.cs