public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(ThePerson != null ? ThePerson.ToStepValue() : "$"); parameters.Add(TheOrganization != null ? TheOrganization.ToStepValue() : "$"); parameters.Add(Roles != null ? Roles.ToStepValue() : "$"); return(string.Join(", ", parameters.ToArray())); }
protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options) { base.setJSON(obj, host, options); obj["ThePerson"] = ThePerson.getJson(this, options); obj["TheOrganization"] = TheOrganization.getJson(this, options); LIST <IfcActorRole> roles = Roles; if (roles.Count > 0) { JArray array = new JArray(); foreach (IfcActorRole role in roles) { array.Add(role.getJson(this, options)); } obj["Roles"] = array; } }
protected override void setJSON(JObject obj, BaseClassIfc host, HashSet <int> processed) { base.setJSON(obj, host, processed); obj["ThePerson"] = ThePerson.getJson(this, processed); obj["TheOrganization"] = TheOrganization.getJson(this, processed); ReadOnlyCollection <IfcActorRole> roles = Roles; if (roles.Count > 0) { JArray array = new JArray(); foreach (IfcActorRole role in roles) { array.Add(role.getJson(this, processed)); } obj["Roles"] = array; } }
public override string ToString() { string person = ThePerson.ToString(); string org = TheOrganization.ToString(); if (!string.IsNullOrWhiteSpace(person) && !string.IsNullOrWhiteSpace(org)) { return("'" + person + "' at '" + org + "'"); } else if (!string.IsNullOrWhiteSpace(person)) { return(person); } else if (!string.IsNullOrWhiteSpace(org)) { return(org); } else { return("Unknown"); } }
internal override void SetXML(XmlElement xml, BaseClassIfc host, Dictionary <int, XmlElement> processed) { base.SetXML(xml, host, processed); xml.AppendChild(ThePerson.GetXML(xml.OwnerDocument, "ThePerson", this, processed)); xml.AppendChild(TheOrganization.GetXML(xml.OwnerDocument, "TheOrganization", this, processed)); }