public static RateRange Create(Frequency[] frequency, RepeatLimit[] repeatLimit = null) { RateRange rr = _new(); rr.frequency = frequency; rr.repeatLimit = repeatLimit; return(rr); }
private static RateRange Create(System.UInt32 size) { RateRange rr = _new(); rr.frequency = new Frequency[size]; rr.repeatLimit = new RepeatLimit[size]; return(rr); }
/// <summary> /// Serialize to a JSON object /// </summary> public new void SerializeJson(Utf8JsonWriter writer, JsonSerializerOptions options, bool includeStartObject = true) { if (includeStartObject) { writer.WriteStartObject(); } ((Fhir.R4.Models.Element) this).SerializeJson(writer, options, false); if (Type != null) { writer.WritePropertyName("type"); Type.SerializeJson(writer, options); } if (DoseRange != null) { writer.WritePropertyName("doseRange"); DoseRange.SerializeJson(writer, options); } if (DoseQuantity != null) { writer.WritePropertyName("doseQuantity"); DoseQuantity.SerializeJson(writer, options); } if (RateRatio != null) { writer.WritePropertyName("rateRatio"); RateRatio.SerializeJson(writer, options); } if (RateRange != null) { writer.WritePropertyName("rateRange"); RateRange.SerializeJson(writer, options); } if (RateQuantity != null) { writer.WritePropertyName("rateQuantity"); RateQuantity.SerializeJson(writer, options); } if (includeStartObject) { writer.WriteEndObject(); } }
public static RateRange Create(FreqRepeatLimitPair[] pairs) { RateRange rr = Create((System.UInt32)pairs.Length); System.UInt32 idx = 0; foreach (FreqRepeatLimitPair pair in pairs) { rr.frequency[idx].low = pair.low; rr.frequency[idx].high = pair.high; rr.frequency[idx].frequency = pair.frequency; rr.repeatLimit[idx].low = pair.low; rr.repeatLimit[idx].high = pair.high; rr.repeatLimit[idx].repeatLimit = pair.repeatLimit; ++idx; } return(rr); }
public static ColorHandler Create(DeviceZone.AbstractIlluminationDevice_Zone dz, IlluminationMode mode, ColorRanges color, RateRange rate) { ColorHandler ch = Create(dz, mode); ch.color_range = color; ch.rate_range = rate; return(ch); }
private static RateRange _new() { RateRange cr = UnityEngine.ScriptableObject.CreateInstance <RateRange>(); return(cr); }
public static TactileHandler Create(DeviceZone.AbstractTactileDevice_Zone dz, TactileMode mode, TactileEffectRange[] pattern, RateRange rate) { TactileHandler hh = Create(dz, mode, pattern); hh.rate_range = rate; return(hh); }