Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / SourceItem.cs / 1 / 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. 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- VectorConverter.cs
- QuaternionAnimation.cs
- NamedPermissionSet.cs
- ActiveXSite.cs
- unitconverter.cs
- PnrpPeerResolver.cs
- ClientTargetCollection.cs
- NCryptNative.cs
- iisPickupDirectory.cs
- UnsafeNativeMethods.cs
- Events.cs
- TypeSystem.cs
- ApplicationGesture.cs
- TemplateContentLoader.cs
- DeferredTextReference.cs
- SessionIDManager.cs
- TabletCollection.cs
- ExpressionLink.cs
- EmptyQuery.cs
- ConvertTextFrag.cs
- BufferedStream2.cs
- RSAPKCS1SignatureFormatter.cs
- EtwTrace.cs
- CheckableControlBaseAdapter.cs
- WebContext.cs
- StringConverter.cs
- ProfilePropertySettingsCollection.cs
- Base64Encoding.cs
- CachedRequestParams.cs
- ClientSponsor.cs
- WebServiceClientProxyGenerator.cs
- InputQueueChannel.cs
- InvalidateEvent.cs
- TabletDeviceInfo.cs
- IPipelineRuntime.cs
- BinaryMessageEncodingElement.cs
- SystemWebSectionGroup.cs
- FrameworkContentElementAutomationPeer.cs
- EditorAttribute.cs
- Inline.cs
- CallbackValidatorAttribute.cs
- SoapObjectReader.cs
- OleDbFactory.cs
- FieldMetadata.cs
- SystemIPAddressInformation.cs
- ObjectDataSourceMethodEventArgs.cs
- DataGridViewCellConverter.cs
- XmlnsCache.cs
- SiteMapNode.cs
- PointCollection.cs
- OleDbRowUpdatedEvent.cs
- WsatServiceAddress.cs
- TypeLibraryHelper.cs
- XmlDocumentSerializer.cs
- ProviderManager.cs
- RuleInfoComparer.cs
- BitmapSource.cs
- NeutralResourcesLanguageAttribute.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- BoundingRectTracker.cs
- AuthenticateEventArgs.cs
- Win32SafeHandles.cs
- SetterBaseCollection.cs
- Stylus.cs
- _NegoState.cs
- PointLight.cs
- WindowHideOrCloseTracker.cs
- FontCollection.cs
- DesignerWidgets.cs
- RawAppCommandInputReport.cs
- MexBindingBindingCollectionElement.cs
- PrefixQName.cs
- ListItemConverter.cs
- AutomationEventArgs.cs
- TypeProvider.cs
- UnmanagedMarshal.cs
- MetaModel.cs
- xmlglyphRunInfo.cs
- WebDescriptionAttribute.cs
- MasterPageCodeDomTreeGenerator.cs
- DPCustomTypeDescriptor.cs
- TextRunCacheImp.cs
- BinaryCommonClasses.cs
- DbProviderFactory.cs
- ServiceOperationWrapper.cs
- TextSimpleMarkerProperties.cs
- Parameter.cs
- SQLDoubleStorage.cs
- CustomAttributeFormatException.cs
- Avt.cs
- FormattedText.cs
- ListDictionaryInternal.cs
- IndexedString.cs
- TypeBuilder.cs
- SoapCodeExporter.cs
- QueryReaderSettings.cs
- NaturalLanguageHyphenator.cs
- TypeConstant.cs
- Camera.cs
- NetworkInformationPermission.cs