Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Threading / LockCookie.cs / 1 / LockCookie.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: LockCookie ** ** ** Purpose: Defines the lock that implements ** single-writer/multiple-reader semantics ** ** ===========================================================*/ namespace System.Threading { using System; [System.Runtime.InteropServices.ComVisible(true)] public struct LockCookie { private int _dwFlags; private int _dwWriterSeqNum; private int _wReaderAndWriterLevel; private int _dwThreadID; public override int GetHashCode() { // review - [....]! return _dwFlags + _dwWriterSeqNum + _wReaderAndWriterLevel + _dwThreadID; } public override bool Equals(Object obj) { if (obj is LockCookie) return Equals((LockCookie)obj); else return false; } public bool Equals(LockCookie obj) { return obj._dwFlags == _dwFlags && obj._dwWriterSeqNum == _dwWriterSeqNum && obj._wReaderAndWriterLevel == _wReaderAndWriterLevel && obj._dwThreadID == _dwThreadID; } public static bool operator ==(LockCookie a, LockCookie b) { return a.Equals(b); } public static bool operator !=(LockCookie a, LockCookie b) { return !(a == b); } } }
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
- FlowDocumentPageViewerAutomationPeer.cs
- TransformPatternIdentifiers.cs
- TraceUtility.cs
- CannotUnloadAppDomainException.cs
- ScriptResourceHandler.cs
- SystemWebCachingSectionGroup.cs
- Pen.cs
- CodeMethodInvokeExpression.cs
- TaskFormBase.cs
- InternalDuplexBindingElement.cs
- SpeechSynthesizer.cs
- EncodingInfo.cs
- InputLangChangeEvent.cs
- BoolLiteral.cs
- ExpressionVisitor.cs
- Unit.cs
- FileInfo.cs
- FaultDescription.cs
- DataColumnMapping.cs
- Int32CollectionValueSerializer.cs
- ToolBar.cs
- ToolStripStatusLabel.cs
- JsonDataContract.cs
- XmlSortKey.cs
- InvokeFunc.cs
- MethodExpr.cs
- Listbox.cs
- DecimalConverter.cs
- XhtmlTextWriter.cs
- CreateBookmarkScope.cs
- IIS7UserPrincipal.cs
- WorkflowValidationFailedException.cs
- NavigationExpr.cs
- Converter.cs
- AssertSection.cs
- XmlEncoding.cs
- FixedSOMTableRow.cs
- TableHeaderCell.cs
- SecurityRuntime.cs
- ServiceOperationHelpers.cs
- SmtpFailedRecipientsException.cs
- PropertyPathConverter.cs
- OdbcConnectionOpen.cs
- Int16KeyFrameCollection.cs
- UdpMessageProperty.cs
- ChangeTracker.cs
- SvcMapFile.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- SelectorAutomationPeer.cs
- AutomationIdentifierGuids.cs
- infer.cs
- ToolStripDropDownDesigner.cs
- DocumentPage.cs
- IncomingWebRequestContext.cs
- Transform.cs
- TransformPattern.cs
- SmiConnection.cs
- RealProxy.cs
- TimeBoundedCache.cs
- NamespaceEmitter.cs
- RunClient.cs
- XmlSchemaExporter.cs
- TableSectionStyle.cs
- TextRenderer.cs
- Brush.cs
- QueryStatement.cs
- HMACSHA1.cs
- SyncOperationState.cs
- VoiceChangeEventArgs.cs
- XmlHierarchicalDataSourceView.cs
- WinEventHandler.cs
- KoreanCalendar.cs
- SafeNativeMemoryHandle.cs
- Schema.cs
- DBCSCodePageEncoding.cs
- WorkflowQueuingService.cs
- LocalServiceSecuritySettingsElement.cs
- TripleDES.cs
- BindableAttribute.cs
- NumberAction.cs
- EventMappingSettings.cs
- ZipIOBlockManager.cs
- XmlElementAttributes.cs
- OleDbRowUpdatingEvent.cs
- StringDictionary.cs
- WebPartHeaderCloseVerb.cs
- RequestQueue.cs
- EntityDataSourceSelectedEventArgs.cs
- PlatformCulture.cs
- XmlSchemaAnnotated.cs
- SettingsAttributes.cs
- SchemaElementDecl.cs
- ToolStripPanelRenderEventArgs.cs
- CodeDOMProvider.cs
- TreeNode.cs
- LowerCaseStringConverter.cs
- CompositeControl.cs
- ToolboxItemAttribute.cs
- LongValidatorAttribute.cs
- PermissionToken.cs