public bool TryGetWellKnownAttribute(WellKnownAttributeFlags flag, out bool value) { int theBits = _bits; // Read this.bits once to ensure the consistency of the value and completion flags. value = (theBits & ((int)flag << WellKnownAttributeDataOffset)) != 0; return((theBits & ((int)flag << WellKnownAttributeCompletionFlagOffset)) != 0); }
private bool IsWellKnownAttributeComplete(WellKnownAttributeFlags flag) { var result = (this.lazyWellKnownAttributeData & ((int)flag << WellKnownAttributeCompletionFlagOffset)) != 0; // all well-known attributes are complete if we don't have handle: Debug.Assert(!this.handle.IsNil || result); return(result); }
public bool SetWellKnownAttribute(WellKnownAttributeFlags flag, bool value) { // a value has been decoded: int bitsToSet = (int)flag << WellKnownAttributeCompletionFlagOffset; if (value) { // the actual value: bitsToSet |= ((int)flag << WellKnownAttributeDataOffset); } ThreadSafeFlagOperations.Set(ref _bits, bitsToSet); return value; }
public bool SetWellKnownAttribute(WellKnownAttributeFlags flag, bool value) { // a value has been decoded: int bitsToSet = (int)flag << WellKnownAttributeCompletionFlagOffset; if (value) { // the actual value: bitsToSet |= ((int)flag << WellKnownAttributeDataOffset); } ThreadSafeFlagOperations.Set(ref _bits, bitsToSet); return(value); }
private bool SetWellKnownAttribute(WellKnownAttributeFlags flag, bool value) { // a value has been decoded: int newFlags = (int)flag << WellKnownAttributeCompletionFlagOffset; if (value) { // the actual value: newFlags |= (int)flag; } ThreadSafeFlagOperations.Clear(ref this.lazyWellKnownAttributeData, (int)newFlags); return(value); }
public bool TryGetWellKnownAttribute(WellKnownAttributeFlags flag, out bool value) { int theBits = _bits; // Read this.bits once to ensure the consistency of the value and completion flags. value = (theBits & ((int)flag << WellKnownAttributeDataOffset)) != 0; return (theBits & ((int)flag << WellKnownAttributeCompletionFlagOffset)) != 0; }
private bool GetWellKnownAttribute(WellKnownAttributeFlags flag) { Debug.Assert(IsWellKnownAttributeComplete(flag)); return (this.lazyWellKnownAttributeData & (int)flag) != 0; }
private bool IsWellKnownAttributeComplete(WellKnownAttributeFlags flag) { var result = (this.lazyWellKnownAttributeData & ((int)flag << WellKnownAttributeCompletionFlagOffset)) != 0; // all well-known attributes are complete if we don't have handle: Debug.Assert(!this.handle.IsNil || result); return result; }
private bool SetWellKnownAttribute(WellKnownAttributeFlags flag, bool value) { // a value has been decoded: int newFlags = (int)flag << WellKnownAttributeCompletionFlagOffset; if (value) { // the actual value: newFlags |= (int)flag; } ThreadSafeFlagOperations.Clear(ref this.lazyWellKnownAttributeData, (int)newFlags); return value; }
private bool GetWellKnownAttribute(WellKnownAttributeFlags flag) { Debug.Assert(IsWellKnownAttributeComplete(flag)); return((this.lazyWellKnownAttributeData & (int)flag) != 0); }