public static void set(this global::System.Collections.BitArray ba, int firstIndex, int lastIndex) { for (int i = firstIndex; i < lastIndex; i++) { ba.Set(i, true); } }
public Priorizer(int priorityCount, int channelCount) { this.channelCount = channelCount; requests = new global::System.Collections.BitArray[priorityCount]; for (int i = 0; i < priorityCount; i++) { requests[i] = new global::System.Collections.BitArray(channelCount); } lastChannel = channelCount - 1; }
public static void Fetch(SmsBase sms, ref string source) { sms._serviceCenterNumber = PopServiceCenterAddress(ref source); sms._pduType = PopByte(ref source); global::System.Collections.BitArray bits = new global::System.Collections.BitArray(new byte[] { sms._pduType }); sms.ReplyPathExists = bits[7]; sms.UserDataStartsWithHeader = bits[6]; sms.StatusReportIndication = bits[5]; sms.ValidityPeriodFormat = (ValidityPeriodFormat)(sms._pduType & 0x18); sms.Direction = (SmsDirection)(sms._pduType & 1); }
public static int nextSetBit(this global::System.Collections.BitArray ba, int firstIndex) { int idx = firstIndex; while (idx < ba.Count) { if (ba.Get(idx)) { return(idx); } idx++; } return(-1); }
public static void clear(this global::System.Collections.BitArray ba, int index) { ba.Set(index, false); }
public static void set(this global::System.Collections.BitArray ba, int index) { ba.Set(index, true); }
public static int size(this global::System.Collections.BitArray ba) { return(ba.Count); }