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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlMtomWriter.cs
- SystemWebCachingSectionGroup.cs
- RemotingConfigParser.cs
- CacheAxisQuery.cs
- CompletedAsyncResult.cs
- TypeCollectionPropertyEditor.cs
- ObjectConverter.cs
- isolationinterop.cs
- DecodeHelper.cs
- WebServiceEnumData.cs
- IndexedEnumerable.cs
- SqlInternalConnection.cs
- MeasurementDCInfo.cs
- VisemeEventArgs.cs
- XmlSortKeyAccumulator.cs
- GridEntry.cs
- WebPartConnectVerb.cs
- IgnoreDeviceFilterElement.cs
- RequestQueue.cs
- TransformedBitmap.cs
- NestedContainer.cs
- LogicalChannel.cs
- DataGridViewCellValidatingEventArgs.cs
- MeasurementDCInfo.cs
- ByteKeyFrameCollection.cs
- View.cs
- SynchronousChannel.cs
- SchemaTableColumn.cs
- PeerCollaborationPermission.cs
- CroppedBitmap.cs
- FlowDocumentPage.cs
- TypeNameConverter.cs
- BinaryEditor.cs
- RowUpdatedEventArgs.cs
- Int16Converter.cs
- wgx_render.cs
- MergeExecutor.cs
- ExitEventArgs.cs
- InstalledFontCollection.cs
- EmptyStringExpandableObjectConverter.cs
- ResourceReferenceExpressionConverter.cs
- DataGridSortingEventArgs.cs
- NameSpaceEvent.cs
- DetailsViewCommandEventArgs.cs
- XmlBinaryReaderSession.cs
- PeerCredential.cs
- HelloOperationCD1AsyncResult.cs
- WebServiceMethodData.cs
- PageRanges.cs
- RecipientInfo.cs
- ToolStripArrowRenderEventArgs.cs
- EntityObject.cs
- EventLogger.cs
- EncodingStreamWrapper.cs
- DictionaryTraceRecord.cs
- LayoutEditorPart.cs
- AsyncPostBackTrigger.cs
- HtmlValidationSummaryAdapter.cs
- FilterQuery.cs
- TextRangeEdit.cs
- DataColumnMapping.cs
- Transactions.cs
- MessageQueueTransaction.cs
- InternalsVisibleToAttribute.cs
- SerializationInfo.cs
- HotSpot.cs
- DocumentSequence.cs
- NameValueConfigurationCollection.cs
- TypeInformation.cs
- AssertFilter.cs
- TaskDesigner.cs
- Vector.cs
- KeyValuePairs.cs
- BitmapEffectvisualstate.cs
- DirectoryRedirect.cs
- ObjectConverter.cs
- MetaData.cs
- StrokeCollection.cs
- Win32.cs
- FormsAuthenticationUserCollection.cs
- OutputScopeManager.cs
- RemotingServices.cs
- NameGenerator.cs
- MailAddress.cs
- SqlLiftWhereClauses.cs
- TriState.cs
- Group.cs
- XPathCompileException.cs
- DelegateTypeInfo.cs
- UnmanagedMarshal.cs
- JsonReader.cs
- HyperLink.cs
- TypeLibConverter.cs
- MultiDataTrigger.cs
- OptimisticConcurrencyException.cs
- ConsoleKeyInfo.cs
- DefaultValueAttribute.cs
- EventLogInformation.cs
- DesignOnlyAttribute.cs
- CalendarTable.cs