private static byte?GetInterfaceByte(int groupNo, InterfaceByteType type, AtrInterfaceByteGroupToken[] groups) { if (groups.Length > groupNo) { AtrInterfaceByteGroupToken InterfaceByteGroup = groups[groupNo]; switch (type) { case InterfaceByteType.Ta: return(InterfaceByteGroup.Ta); case InterfaceByteType.Tb: return(InterfaceByteGroup.Tb); case InterfaceByteType.Tc: return(InterfaceByteGroup.Tc); default: throw new ArgumentOutOfRangeException(nameof(type)); } } else { return(null); } }
private void SetInterfaceByte(int groupNo, InterfaceByteType type, AtrInterfaceByteGroupToken[] groups, byte?value) { if (groups.Length > groupNo) { AtrInterfaceByteGroupToken InterfaceByteGroup = groups[groupNo]; switch (type) { case InterfaceByteType.Ta: InterfaceByteGroup.Ta = value; break; case InterfaceByteType.Tb: InterfaceByteGroup.Tb = value; break; case InterfaceByteType.Tc: InterfaceByteGroup.Tc = value; break; default: throw new ArgumentOutOfRangeException(nameof(type)); } } else { throw new ArgumentOutOfRangeException(nameof(groupNo)); } this.RemoveUnusedGroups(); }
protected void SetInterfaceByte(InterfaceByteGroupType groupType, int groupNo, InterfaceByteType type, byte?value) { this.EnsureGroupNumberExists(groupNo, _ => _.Type == groupType); this.SetInterfaceByte(groupNo, type, this.GetInterfaceGroups().Where(_ => _.Type == groupType).ToArray(), value); }
protected void SetInterfaceByte(int groupNo, InterfaceByteType type, byte?value) { this.EnsureGroupNumberExists(groupNo, _ => true); this.SetInterfaceByte(groupNo, type, this.GetInterfaceGroups().ToArray(), value); }
protected byte?GetInterfaceByte(InterfaceByteGroupType groupType, int groupNo, InterfaceByteType type) { return(AtrParametersBase.GetInterfaceByte(groupNo, type, this.GetInterfaceGroups().Where(_ => _.Type == groupType).ToArray())); }
protected byte?GetInterfaceByte(int groupNo, InterfaceByteType type) { return(AtrParametersBase.GetInterfaceByte(groupNo, type, this.GetInterfaceGroups().ToArray())); }