public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Identifier; if (dest != null) { base.CopyTo(dest); if(UseElement != null) dest.UseElement = (Code<Hl7.Fhir.Model.Identifier.IdentifierUse>)UseElement.DeepCopy(); if(Type != null) dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); if(SystemElement != null) dest.SystemElement = (Hl7.Fhir.Model.FhirUri)SystemElement.DeepCopy(); if(ValueElement != null) dest.ValueElement = (Hl7.Fhir.Model.FhirString)ValueElement.DeepCopy(); if(Period != null) dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy(); if(Assigner != null) dest.Assigner = (Hl7.Fhir.Model.ResourceReference)Assigner.DeepCopy(); return dest; } else throw new ArgumentException("Can only copy to an object of the same type", "other"); }
public override string DataToValue(ValueElement element, dynamic data) { var resolvedDef = ResolveDef(element.container); return(resolvedDef.DataToValue(element, data)); }
public virtual void SetData(ValueElement element, dynamic data) { element._data = data; element.SetState(ElementState.Modified); }
public virtual void SetValue(ValueElement element, string value) { SetData(element, formatDef == null ? DataHelpers.ParseInt64(value) : formatDef.ValueToData(element, value)); }
public override dynamic ValueToData(ValueElement element, string value) { return(Int64.Parse(value)); }
internal virtual void WriteData( ValueElement element, PluginFileOutput output ) { throw new NotImplementedException(); }
public override string DataToValue(ValueElement element, dynamic data) { return(data.ToString()); }
private MainRecord ResolveNavmesh(ValueElement element) { return(element?.container?.elements?[0].referencedRecord); }
public override dynamic ValueToData(ValueElement element, string value) { float v = float.Parse(value); return(Math.Min(Math.Round(v * 1270 + 127), 254)); }
public override string DataToValue(ValueElement element, dynamic data) { float v = (data - 127) / 1270.0f; return(v.ToString("F4")); }
// Required for the parsing to work #pragma warning disable IDE0051 // Remove unused private members private void AddValueElement(ValueElement value) { this.ValueElements.Add(value); }