Canguro.Model.Serializer.Deserializer.readLineDistributedForces C# (CSharp) Method

readLineDistributedForces() private method

private readLineDistributedForces ( XmlNode node ) : void
node XmlNode
return void
        private void readLineDistributedForces(XmlNode node)
        {
            uint id = uint.Parse(readAttribute(node, "Frame", "0"));
            string lcName = readAttribute(node, "LoadCase", "").Trim();
            lcName = (lcName.Length > 0) ? lcName : Culture.Get("Case");
            LoadCase lCase = model.LoadCases[lcName];
            LineElement obj = model.LineList[id];
            if (obj != null && lCase != null)
            {
                AssignedLoads loads = obj.Loads;
                DistributedSpanLoad load = new DistributedSpanLoad();
                load.Type = (LineLoad.LoadType)Enum.Parse(typeof(LineLoad.LoadType), readAttribute(node, "Type", load.Type.ToString()));
                string coordSys = readAttribute(node, "CoordSys", "GLOBAL");
                string dir = readAttribute(node, "Dir", load.Direction.ToString());
                load.Direction = GetLoadDirection(coordSys, dir);
                load.Da = float.Parse(readAttribute(node, "RelDistA", load.Da.ToString()));
                load.Db = float.Parse(readAttribute(node, "RelDistB", load.Db.ToString()));
                load.La = float.Parse(readAttribute(node, "FOverLA", load.La.ToString()));
                load.Lb = float.Parse(readAttribute(node, "FOverLB", load.Lb.ToString()));
                loads.Add(load, lCase);
            }
        }
Deserializer