public Sensor this[int index] { get { object error; var ptr = NativeMethods.rs2_create_sensor(m_instance, index, out error); return(new Sensor(ptr)); } }
/// <summary> /// Creates sensor by index /// </summary> /// <param name="index">the zero based index of sensor to retrieve</param> /// <returns>the requested sensor</returns> public Sensor this[int index] { get { object error; var ptr = NativeMethods.rs2_create_sensor(Handle, index, out error); return(Sensor.Create <T>(ptr)); } }
public IEnumerator <Sensor> GetEnumerator() { object error; int sensorCount = NativeMethods.rs2_get_sensors_count(m_instance, out error); for (int i = 0; i < sensorCount; i++) { var ptr = NativeMethods.rs2_create_sensor(m_instance, i, out error); yield return(new Sensor(ptr)); } }
/// <inheritdoc/> public IEnumerator <T> GetEnumerator() { object error; int sensorCount = NativeMethods.rs2_get_sensors_count(Handle, out error); for (int i = 0; i < sensorCount; i++) { var ptr = NativeMethods.rs2_create_sensor(Handle, i, out error); yield return(Sensor.Create <T>(ptr)); } }