internal override void parseJObject(JObject obj) { base.parseJObject(obj); Identification = extractString(obj.GetValue("Idenfification", StringComparison.InvariantCultureIgnoreCase)); Name = extractString(obj.GetValue("Name", StringComparison.InvariantCultureIgnoreCase)); Description = extractString(obj.GetValue("Description", StringComparison.InvariantCultureIgnoreCase)); DocumentReferences.AddRange(mDatabase.extractJArray <IfcDocumentReference>(obj.GetValue("DocumentReferences", StringComparison.InvariantCultureIgnoreCase) as JArray)); Location = extractString(obj.GetValue("Location", StringComparison.InvariantCultureIgnoreCase)); Purpose = extractString(obj.GetValue("Purpose", StringComparison.InvariantCultureIgnoreCase)); Revision = extractString(obj.GetValue("Revision", StringComparison.InvariantCultureIgnoreCase)); JObject jobj = obj["DocumentOwner"] as JObject; if (jobj != null) { DocumentOwner = mDatabase.ParseJObject <IfcActorSelect>(jobj); } Editors.AddRange(mDatabase.extractJArray <IfcActorSelect>(obj.GetValue("Editors", StringComparison.InvariantCultureIgnoreCase) as JArray)); JToken token = obj.GetValue("CreationTime"); if (token != null) { CreationTime = DateTime.Parse(token.Value <string>()); } token = obj.GetValue("LastRevisionTime"); if (token != null) { LastRevisionTime = DateTime.Parse(token.Value <string>()); } ElectronicFormat = extractString(obj.GetValue("ElectronicFormat", StringComparison.InvariantCultureIgnoreCase)); token = obj.GetValue("ValidFrom"); if (token != null) { ValidFrom = DateTime.Parse(token.Value <string>()); } token = obj.GetValue("ValidUntil"); if (token != null) { ValidUntil = DateTime.Parse(token.Value <string>()); } token = obj.GetValue("Confidentiality"); if (token != null) { Enum.TryParse <IfcDocumentConfidentialityEnum>(token.Value <string>(), true, out mConfidentiality); } token = obj.GetValue("Status"); if (token != null) { Enum.TryParse <IfcDocumentStatusEnum>(token.Value <string>(), true, out mStatus); } }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary) { mIdentification = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len)); mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len)); mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len)); if (release < ReleaseVersion.IFC4) { DocumentReferences.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcDocumentReference)); } else { mLocation = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len)); } mPurpose = ParserSTEP.StripString(str, ref pos, len); mIntendedUse = ParserSTEP.StripString(str, ref pos, len); mScope = ParserSTEP.StripString(str, ref pos, len); mRevision = ParserSTEP.StripString(str, ref pos, len); mDocumentOwner = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcActorSelect; Editors.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcActorSelect)); mCreationTime = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mLastRevisionTime = IfcDateTime.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); if (release < ReleaseVersion.IFC4) { mSSElectronicFormat = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcDocumentElectronicFormat; } else { mElectronicFormat = ParserSTEP.StripString(str, ref pos, len); } mValidFrom = IfcDate.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); mValidUntil = IfcDate.ParseSTEP(ParserSTEP.StripField(str, ref pos, len)); string s = ParserSTEP.StripField(str, ref pos, len); if (s[0] == '.') { Enum.TryParse <IfcDocumentConfidentialityEnum>(s.Replace(".", ""), true, out mConfidentiality); } s = ParserSTEP.StripField(str, ref pos, len); if (s[0] == '.') { Enum.TryParse <IfcDocumentStatusEnum>(s.Replace(".", ""), true, out mStatus); } }
public void AddEditors(params Person[] editors) { Editors.AddRange(editors); }
//метод void AddEditors(params Person[] ) для додання редакторів в список public void AddEditors(params Person[] persons) { Editors.AddRange(persons); }
internal void AddEditors(params Person[] editors) { Editors.AddRange(editors); }