Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / SourceItem.cs / 1305600 / SourceItem.cs
using System; namespace System.Windows { // An item in the source context internal struct SourceItem { #region Construction // Constructor for SourceItem internal SourceItem(int startIndex, object source) { _startIndex = startIndex; _source = source; } #endregion Construction #region Operations // Gettor for StartIndex internal int StartIndex { get { return _startIndex; } } // Gettor for Source internal object Source { get { return _source; } } /* Commented out to avoid "uncalled private code" fxcop violation ////// Cleanup all the references within the data /// internal void Clear() { _startIndex = -1; _source = null; } */ ////// Is the given object equals the current /// public override bool Equals(object o) { return Equals((SourceItem)o); } ////// Is the given SourceItem equals the current /// public bool Equals(SourceItem sourceItem) { return ( sourceItem._startIndex == this._startIndex && sourceItem._source == this._source); } ////// Serves as a hash function for a particular type, suitable for use in /// hashing algorithms and data structures like a hash table /// public override int GetHashCode() { return base.GetHashCode(); } ////// Equals operator overload /// public static bool operator== (SourceItem sourceItem1, SourceItem sourceItem2) { return sourceItem1.Equals(sourceItem2); } ////// NotEquals operator overload /// public static bool operator!= (SourceItem sourceItem1, SourceItem sourceItem2) { return !sourceItem1.Equals(sourceItem2); } #endregion Operations #region Data private int _startIndex; private object _source; #endregion Data } } // 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
- DefaultShape.cs
- ConfigurationStrings.cs
- SystemParameters.cs
- ResourceDescriptionAttribute.cs
- ComponentChangingEvent.cs
- DownloadProgressEventArgs.cs
- Substitution.cs
- BamlVersionHeader.cs
- ColumnMapTranslator.cs
- log.cs
- ErrorFormatterPage.cs
- ZoomingMessageFilter.cs
- Point3DCollectionValueSerializer.cs
- HexParser.cs
- MethodAccessException.cs
- SortedDictionary.cs
- SequenceRange.cs
- XamlUtilities.cs
- ConnectionStringsSection.cs
- Help.cs
- RenamedEventArgs.cs
- StandardToolWindows.cs
- DynamicILGenerator.cs
- DateTimeConverter2.cs
- XmlToDatasetMap.cs
- ClassicBorderDecorator.cs
- ReadOnlyPropertyMetadata.cs
- ConnectionStringsExpressionBuilder.cs
- BuildResult.cs
- AsyncOperationLifetimeManager.cs
- StateMachineSubscription.cs
- CodeLinePragma.cs
- Point3DAnimationBase.cs
- OleDbParameter.cs
- NavigationProperty.cs
- TextTreeRootNode.cs
- PerfCounters.cs
- NegotiateStream.cs
- SortKey.cs
- GridView.cs
- NumberFunctions.cs
- InstallerTypeAttribute.cs
- AggregateNode.cs
- SymLanguageType.cs
- MetadataArtifactLoaderCompositeResource.cs
- AmbientLight.cs
- PassportAuthenticationModule.cs
- UnauthorizedWebPart.cs
- TimeoutHelper.cs
- PathTooLongException.cs
- FloaterParaClient.cs
- AdapterUtil.cs
- OutputCacheModule.cs
- WebPartEditorOkVerb.cs
- RewritingSimplifier.cs
- StringExpressionSet.cs
- BrushValueSerializer.cs
- ApplicationServiceHelper.cs
- RemoteEndpointMessageProperty.cs
- ObservableCollection.cs
- PolygonHotSpot.cs
- _NativeSSPI.cs
- StructuralType.cs
- UIElementParaClient.cs
- RemoteCryptoTokenProvider.cs
- SqlDataSourceConnectionPanel.cs
- CodeTryCatchFinallyStatement.cs
- InputBindingCollection.cs
- SingletonChannelAcceptor.cs
- Assert.cs
- AdapterUtil.cs
- ColumnWidthChangedEvent.cs
- Metadata.cs
- WindowsAuthenticationModule.cs
- ProjectionQueryOptionExpression.cs
- NativeCppClassAttribute.cs
- ObjectDataSourceView.cs
- Vector3DConverter.cs
- Error.cs
- SpellerHighlightLayer.cs
- PublisherIdentityPermission.cs
- DisplayMemberTemplateSelector.cs
- SettingsSavedEventArgs.cs
- storepermission.cs
- SignatureConfirmationElement.cs
- ProfileService.cs
- EventToken.cs
- precedingsibling.cs
- ToolStripRenderEventArgs.cs
- NamespaceCollection.cs
- NamespaceExpr.cs
- UniqueIdentifierService.cs
- NominalTypeEliminator.cs
- HttpResponse.cs
- WebPartTransformerAttribute.cs
- ProfessionalColorTable.cs
- DataSourceProvider.cs
- MasterPageCodeDomTreeGenerator.cs
- XmlHierarchicalDataSourceView.cs
- DependsOnAttribute.cs