Here are the examples of the csharp api class System.Collections.BitArray.Get(int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
141 Examples
0
1. Example
Project: CypherCore
Source File: AccountTypes.cs
Source File: AccountTypes.cs
public void WriteTo(pb::CodedOutputStream output) { if (bitArray.Get(IsUsingRidFieldNumber)) { output.WriteRawTag(24); output.WriteBool(IsUsingRid); } if (bitArray.Get(IsRealIdVisibleForViewFriendsFieldNumber)) { output.WriteRawTag(32); output.WriteBool(IsRealIdVisibleForViewFriends); } if (bitArray.Get(IsHiddenFromFriendFinderFieldNumber)) { output.WriteRawTag(40); output.WriteBool(IsHiddenFromFriendFinder); } if (bitArray.Get(GameInfoPrivacyFieldNumber)) { output.WriteRawTag(48); output.WriteEnum((int)GameInfoPrivacy); } }
0
2. Example
Project: CypherCore
Source File: AccountTypes.cs
Source File: AccountTypes.cs
public int CalculateSize() { int size = 0; if (bitArray.Get(IsUsingRidFieldNumber)) { size += 1 + 1; } if (bitArray.Get(IsRealIdVisibleForViewFriendsFieldNumber)) { size += 1 + 1; } if (bitArray.Get(IsHiddenFromFriendFinderFieldNumber)) { size += 1 + 1; } if (bitArray.Get(GameInfoPrivacyFieldNumber)) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)GameInfoPrivacy); } return size; }
0
3. Example
Project: CypherCore
Source File: AccountTypes.cs
Source File: AccountTypes.cs
public void WriteTo(pb::CodedOutputStream output) { if (bitArray.Get(IsSuspendedFieldNumber)) { output.WriteRawTag(32); output.WriteBool(IsSuspended); } if (bitArray.Get(IsBannedFieldNumber)) { output.WriteRawTag(40); output.WriteBool(IsBanned); } if (bitArray.Get(SuspensionExpiresFieldNumber)) { output.WriteRawTag(48); output.WriteUInt64(SuspensionExpires); } if (bitArray.Get(ProgramFieldNumber)) { output.WriteRawTag(61); output.WriteFixed32(Program); } if (bitArray.Get(IsLockedFieldNumber)) { output.WriteRawTag(64); output.WriteBool(IsLocked); } if (bitArray.Get(IsBamUnlockableFieldNumber)) { output.WriteRawTag(72); output.WriteBool(IsBamUnlockable); } }
0
4. Example
Project: CypherCore
Source File: AccountTypes.cs
Source File: AccountTypes.cs
public int CalculateSize() { int size = 0; if (bitArray.Get(IsSuspendedFieldNumber)) { size += 1 + 1; } if (bitArray.Get(IsBannedFieldNumber)) { size += 1 + 1; } if (bitArray.Get(SuspensionExpiresFieldNumber)) { size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SuspensionExpires); } if (bitArray.Get(ProgramFieldNumber)) { size += 1 + 4; } if (bitArray.Get(IsLockedFieldNumber)) { size += 1 + 1; } if (bitArray.Get(IsBamUnlockableFieldNumber)) { size += 1 + 1; } return size; }
0
5. Example
Project: CypherCore
Source File: AuthenticationService.cs
Source File: AuthenticationService.cs
public void WriteTo(pb::CodedOutputStream output) { if (bitArray.Get(ErrorCodeFi/n ..... /n //View Source file for more details /n }
0
6. Example
Project: CypherCore
Source File: AuthenticationService.cs
Source File: AuthenticationService.cs
public int CalculateSize() { int size = 0; if (bitArray.Get(ErrorCod/n ..... /n //View Source file for more details /n }
0
7. Example
Project: CypherCore
Source File: RpcTypes.cs
Source File: RpcTypes.cs
public void WriteTo(pb::CodedOutputStream output) { if (bitArray.Get(ServiceIdFi/n ..... /n //View Source file for more details /n }
0
8. Example
Project: CypherCore
Source File: RpcTypes.cs
Source File: RpcTypes.cs
public int CalculateSize() { int size = 0; if (bitArray.Get(ServiceI/n ..... /n //View Source file for more details /n }
0
9. Example
Project: CypherCore
Source File: UpdateMask.cs
Source File: UpdateMask.cs
public bool GetBit(int index) { return _mask.Get(index); }
0
10. Example
Project: CypherCore
Source File: Player.Fields.cs
Source File: Player.Fields.cs
public bool GetOption(CUFBoolOptions opt) { return BoolOptions.Get((int)opt); }
0
11. Example
Project: CypherCore
Source File: Map.cs
Source File: Map.cs
private bool isCellMarked(uint pCellId) { return marked_cells.Get((int)pCellId); }
0
12. Example
Project: DotnetSpider
Source File: BloomFilter.cs
Source File: BloomFilter.cs
public bool GetBit(int bit) { return _bitset.Get(bit); }
0
13. Example
Project: dmd-extensions
Source File: FrameUtil.cs
Source File: FrameUtil.cs
public static byte[] Join(int width, int height, byte[][] bitPlanes) { var frame = new byte[width * height]; var planes = new BitArray[bitPlanes.Length]; for (var i = 0; i < bitPlanes.Length; i++) { planes[i] = new BitArray(bitPlanes[i]); } for (var f = 0; f < frame.Length; f++) { for (var p = 0; p < bitPlanes.Length; p++) { try { var bit = planes[p].Get(f) ? (byte)1 : (byte)0; frame[f] |= (byte)(bit << p); } catch (ArgumentOutOfRangeException) { Logger.Error("Error retrieving pixel {0} on plane {1}. Frame size = {2}x{3}, plane size = {4}.", f, p, width, height, planes[p].Length); throw; } } } return frame; }
0
14. Example
Project: LoE-Ghost.Server
Source File: Extensions.cs
Source File: Extensions.cs
[MethodImpl(MethodImplOptions.AggressiveInlining)] public static int GetBits(this BitArray bits, ref int index, int count) { int value = 0; for (int i = 0; i < count; i++, index++) value |= (bits.Get(index) ? 1 : 0) << i; return value; }
0
15. Example
Project: brightwire
Source File: BinaryIntegers.cs
Source File: BinaryIntegers.cs
static float[] _GetBitArray(int val) { var data = new BitArray(new int[] { val }); var ret = new float[32]; for (var i = 0; i < 32; i++) ret[i] = data.Get(i) ? 1f : 0f; return ret; }
0
16. Example
Project: Coob
Source File: Entity.cs
Source File: Entity.cs
public void CopyByMask(Entity from) { LastBitmask = from.LastBitmask; /n ..... /n //View Source file for more details /n }
0
17. Example
Project: csharpewah
Source File: EWAHCompressedBitmapTest.cs
Source File: EWAHCompressedBitmapTest.cs
public static ulong Cardinality(this BitArray bitArray) { ulong res = 0; for (int ii = 0; ii < bitArray.Length; ii++) { if (bitArray.Get((ii))) res++; } return res; }
0
18. Example
Project: ME3Explorer
Source File: FileWriter.cs
Source File: FileWriter.cs
public void Serialize(ref BitArray list) { if (list == null) { throw new ArgumentNullException("list"); } uint count = ((uint)list.Count + 31) / 32; this._Output.WriteValueU32(count, this.Endian); for (uint i = 0; i < count; i++) { uint offset = i * 32; int bits = 0; for (int bit = 0; bit < 32 && offset + bit < list.Count; bit++) { bits |= (list.Get((int)(offset + bit)) ? 1 : 0) << bit; } this._Output.WriteValueS32(bits, this.Endian); } }
0
19. Example
Project: NBitcoin
Source File: BitWriter.cs
Source File: BitWriter.cs
public bool Read() { var v = array.Get(Position); Position++; return v; }
0
20. Example
Project: NBitcoin
Source File: BitWriter.cs
Source File: BitWriter.cs
static byte[] ToByteArray(BitArray bits) { int arrayLength = bits.Length / 8; if(bits.Length % 8 != 0) arrayLength++; byte[] array = new byte[arrayLength]; for(int i = 0; i < bits.Length; i++) { int b = i / 8; int offset = i % 8; array[b] |= bits.Get(i) ? (byte)(1 << offset) : (byte)0; } return array; }
0
21. Example
Project: referencesource
Source File: bitarray.cs
Source File: bitarray.cs
public virtual bool MoveNext() { if (version != bitarray._version) throw new InvalidOperationException(Environment.GetResourceString(ResId.InvalidOperation_EnumFailedVersion)); if (index < (bitarray.Count-1)) { index++; currentElement = bitarray.Get(index); return true; } else index = bitarray.Count; return false; }
0
22. Example
Project: referencesource
Source File: DataStorage.cs
Source File: DataStorage.cs
public object AggregateCount(int[] recordNos) { int count = 0; for (int i = 0; i < recordNos.Length; i++) { if (!this.dbNullBits.Get(recordNos[i])) count++; } return count; }
0
23. Example
Project: referencesource
Source File: DataStorage.cs
Source File: DataStorage.cs
protected int CompareBits(int recordNo1, int recordNo2) { bool recordNo1Null = this.dbNullBits.Get(recordNo1); bool recordNo2Null = this.dbNullBits.Get(recordNo2); if (recordNo1Null ^ recordNo2Null) { if (recordNo1Null) return -1; else return 1; } return 0; }
0
24. Example
Project: referencesource
Source File: DataStorage.cs
Source File: DataStorage.cs
protected Object GetBits(int recordNo) { if (this.dbNullBits.Get(recordNo)) { return NullValue; } return DefaultValue; }
0
25. Example
Project: referencesource
Source File: DataStorage.cs
Source File: DataStorage.cs
protected bool HasValue(int recordNo) { return !this.dbNullBits.Get(recordNo); }
0
26. Example
Project: referencesource
Source File: DataStorage.cs
Source File: DataStorage.cs
public virtual bool IsNull(int recordNo) { return this.dbNullBits.Get(recordNo); }
0
27. Example
Project: referencesource
Source File: MobileListItem.cs
Source File: MobileListItem.cs
internal virtual Object SaveDataState() { String sa0 = _flags.Get(TEXTISDIRTY) ? _text : null; String sa1 = _flags.Get(VALUEISDIRTY) ? _value : null; if (sa0 == null && sa1 == null) { return null; } else { return new String[2] { sa0, sa1 }; } }
0
28. Example
Project: MOSA-Project
Source File: LoopAwareBlockOrder.cs
Source File: LoopAwareBlockOrder.cs
private bool GetLoopMap(int l, BasicBlock b) { return loopMap.Get((l * blockCount) + b.Sequence); }
0
29. Example
Project: MOSA-Project
Source File: BaseRegisterAllocator.cs
Source File: BaseRegisterAllocator.cs
private IEnumerable<VirtualRegister> GetVirtualRegisters(BitArray array) { for (int i = 0; i < array.Count; i++) { if (array.Get(i)) { var virtualRegister = VirtualRegisters[i]; if (!virtualRegister.IsPhysicalRegister) yield return virtualRegister; } } }
0
30. Example
Project: MultiversePlatform
Source File: terminal_set.cs
Source File: terminal_set.cs
public bool contains(int indx) { return _elements.Get(indx); }
0
31. Example
Project: MultiversePlatform
Source File: terminal_set.cs
Source File: terminal_set.cs
public override string ToString() { string result; bool comma_flag; result = "{"; comma_flag = false; for (int t = 0; t < terminal.number(); t++) { if (_elements.Get(t)) { if (comma_flag) result += ", "; else comma_flag = true; result += terminal.find(t).name(); } } result += "}"; return result; }
0
32. Example
Project: MultiversePlatform
Source File: terminal_set.cs
Source File: terminal_set.cs
public string ToMString() { string result="{"; for (int t =0; t<terminal.number();t++) if (t>=_elements.Length) result+="0"; else if (!_elements.Get(t)) result+="0"; else result +="1"; return result +"}"; }
0
33. Example
Project: llilum
Source File: BitArray.cs
Source File: BitArray.cs
public virtual bool MoveNext() { if(m_version != m_bitarray.m_version) { #if EXCEPTION_STRINGS throw new InvalidOperationException( Environment.GetResourceString( "InvalidOperation_EnumFailedVersion" ) ); #else throw new InvalidOperationException(); #endif } if(m_index < (m_bitarray.Count - 1)) { m_index++; m_currentElement = m_bitarray.Get( m_index ); return true; } else { m_index = m_bitarray.Count; } return false; }
0
34. Example
Project: MiFare
Source File: AccessBits.cs
Source File: AccessBits.cs
public static AccessConditions GetAccessConditions(byte[] data) { var byte6 = ne/n ..... /n //View Source file for more details /n }
0
35. Example
Project: MiFare
Source File: Extensions.cs
Source File: Extensions.cs
public static bool IsEqual(this BitArray value, BitArray ba) { if (value.Length != ba.Length) return false; for (var i = 0; i < ba.Length; i++) { if (value.Get(i) != ba.Get(i)) return false; } return true; }
0
36. Example
Project: hmd-eyes
Source File: StandardClassLibraryFormatter.cs
Source File: StandardClassLibraryFormatter.cs
public int Serialize(ref byte[] bytes, int offset, BitArray value, IFormatterResolver formatterResolver) { if (value == null) { return MessagePackBinary.WriteNil(ref bytes, offset); } else { var startOffset = offset; var len = value.Length; offset += MessagePackBinary.WriteArrayHeader(ref bytes, offset, len); for (int i = 0; i < len; i++) { offset += MessagePackBinary.WriteBoolean(ref bytes, offset, value.Get(i)); } return offset - startOffset; } }
0
37. Example
Project: Xploit
Source File: AccessBits.cs
Source File: AccessBits.cs
public static AccessConditions GetAccessConditions(Byte[] data) { BitArray byte6/n ..... /n //View Source file for more details /n }
0
38. Example
Project: Xploit
Source File: Extensions.cs
Source File: Extensions.cs
public static bool IsEqual(this BitArray value, BitArray ba) { if (value.Length != ba.Length) return false; for (int i = 0; i < ba.Length; i++) { if (value.Get(i) != ba.Get(i)) return false; } return true; }
0
39. Example
Project: Xploit
Source File: AccessBits.cs
Source File: AccessBits.cs
public static AccessConditions GetAccessConditions(Byte[] data) { BitArray byte6/n ..... /n //View Source file for more details /n }
0
40. Example
Project: Xploit
Source File: Extensions.cs
Source File: Extensions.cs
public static bool IsEqual(this BitArray value, BitArray ba) { if (value.Length != ba.Length) return false; for (int i = 0; i < ba.Length; i++) { if (value.Get(i) != ba.Get(i)) return false; } return true; }
0
41. Example
Project: CircuitBreaker
Source File: ExecutionResult.cs
Source File: ExecutionResult.cs
public bool Contains(HystrixEventType eventType) { return events.Get((int)eventType); }
0
42. Example
Project: StratisBitcoinFullNode
Source File: BitWriter.cs
Source File: BitWriter.cs
public bool Read() { var v = array.Get(Position); Position++; return v; }
0
43. Example
Project: StratisBitcoinFullNode
Source File: BitWriter.cs
Source File: BitWriter.cs
static byte[] ToByteArray(BitArray bits) { int arrayLength = bits.Length / 8; if(bits.Length % 8 != 0) arrayLength++; byte[] array = new byte[arrayLength]; for(int i = 0; i < bits.Length; i++) { int b = i / 8; int offset = i % 8; array[b] |= bits.Get(i) ? (byte)(1 << offset) : (byte)0; } return array; }
0
44. Example
Project: TomP2P.NET
Source File: Extensions.cs
Source File: Extensions.cs
public static sbyte ToByte(this BitArray ba) { sbyte b = 0; for (int i = 0; i < 8; i++) { if (ba.Get(i)) { b |= (sbyte)(1 << i); // TODO test } } return b; }
0
45. Example
Project: SharpLang
Source File: BitArray.cs
Source File: BitArray.cs
public virtual bool MoveNext() { if (version != bitarray._version) throw new InvalidOperationException(Environment.GetResourceString(ResId.InvalidOperation_EnumFailedVersion)); if (index < (bitarray.Count-1)) { index++; currentElement = bitarray.Get(index); return true; } else index = bitarray.Count; return false; }
0
46. Example
Project: BitSetsNet
Source File: UncompressedBitArray.cs
Source File: UncompressedBitArray.cs
public bool Get(int index) { return array.Get(index); }
0
47. Example
Project: BitSetsNet
Source File: UncompressedBitArray.cs
Source File: UncompressedBitArray.cs
public IEnumerator GetEnumerator() { for (int i = 0; i < this.array.Length; i++) { if (this.array.Get(i) == true) { yield return i; } } }
0
48. Example
Project: MonoGame.Extended
Source File: GuiScreen.cs
Source File: GuiScreen.cs
public void InjectKeyRelease(Keys keyCode) { if (!_heldKeys.Get((int) keyCode)) return; --_heldKeyCount; _heldKeys.Set((int) keyCode, false); // If a control signed responsible for the earlier key press, it will now // receive the release notification. _activatedControl?.ProcessKeyRelease(keyCode); // Reset the activated control if the user has released all buttons on all // input devices. if (!AnyKeysOrButtonsPressed) _activatedControl = null; }
0
49. Example
Project: dmd-extensions
Source File: FrameUtil.cs
Source File: FrameUtil.cs
public static void DumpBinary(int width, int height, byte[] plane) { var i = 0; var planeBits = new BitArray(plane); for (var y = 0; y < height; y++) { var sb = new StringBuilder(width); for (var x = 0; x < width; x++) { sb.Append(planeBits.Get(i++) ? "1" : "0"); } Logger.Debug(sb); } }
0
50. Example
Project: OpenNlp
Source File: Util.cs
Source File: Util.cs
public static bool Increment(BitArray bits, int size) { int i = size - 1; while (i >= 0 && bits.Get(i)) { bits.Set(i--, false); } if (i < 0) { return false; } bits.Set(i, true); return true; }