Beispiel #1
0
        public override void ReadConfiguration(XElement Configuration)
        {
            base.ReadConfiguration(Configuration);

            if (Update)
            {
                MultiplicationFactor       = Configuration.SafeParseDouble("MultiplicationFactor") ?? _MultiplicationFactor;
                Exponent                   = Configuration.SafeParseDouble("Exponent") ?? _Exponent;
                ReachLengthReductionFactor = Configuration.SafeParseDouble("ReachLenghtReductionFactor") ?? _ReachLengthReductionFactor;
                FirstSummerMonth           = Configuration.SafeParseInt("FirstSummerMonth") ?? _FirstSummerMonth;
                LastSummerMonth            = Configuration.SafeParseInt("LastSummerMonth") ?? _LastSummerMonth;

                foreach (var v in Configuration.Element("StreamClasses").Elements("StreamClass"))
                {
                    StreamClassification sc = new StreamClassification();
                    sc.StreamType           = v.SafeParseString("Name");
                    sc.StreamDepthSummer    = v.SafeParseDouble("DepthSummer") ?? 0;
                    sc.StreamDepthWinter    = v.SafeParseDouble("DepthWinter") ?? 0;
                    sc.StreamVelocitySummer = v.SafeParseDouble("VelocitySummer") ?? 0;
                    sc.StreamVelocityWinter = v.SafeParseDouble("VelocityWinter") ?? 0;
                    StreamClasses.Add(sc.StreamType, sc);
                }
                foreach (var v in Configuration.Element("DBFFiles").Elements("DBFFile"))
                {
                    var dbf = new SafeFile();
                    dbf.FileName = v.SafeParseString("FileName");
                    dbf.ColumnNames.Add(v.SafeParseString("IDColumn"));
                    dbf.ColumnNames.Add(v.SafeParseString("NameColumn"));
                    dbf.ColumnNames.Add(v.SafeParseString("LengthColumn"));
                    dbf.ColumnNames.Add(v.SafeParseString("LRColumn"));
                    this.DBFFiles.Add(dbf);
                }
            }
        }
Beispiel #2
0
    public override void ReadConfiguration(XElement Configuration)
    {
      base.ReadConfiguration(Configuration);

      if (Update)
      {

        MultiplicationFactor = Configuration.SafeParseDouble("MultiplicationFactor") ?? _MultiplicationFactor;
        Exponent = Configuration.SafeParseDouble( "Exponent") ?? _Exponent;
        ReachLengthReductionFactor = Configuration.SafeParseDouble("ReachLenghtReductionFactor") ?? _ReachLengthReductionFactor;
        FirstSummerMonth = Configuration.SafeParseInt("FirstSummerMonth") ?? _FirstSummerMonth;
        LastSummerMonth = Configuration.SafeParseInt("LastSummerMonth") ?? _LastSummerMonth;

        foreach (var v in Configuration.Element("StreamClasses").Elements("StreamClass"))
        {
          StreamClassification sc = new StreamClassification();
          sc.StreamType = v.SafeParseString("Name");
          sc.StreamDepthSummer = v.SafeParseDouble("DepthSummer") ?? 0;
          sc.StreamDepthWinter = v.SafeParseDouble("DepthWinter") ?? 0;
          sc.StreamVelocitySummer = v.SafeParseDouble("VelocitySummer") ?? 0;
          sc.StreamVelocityWinter = v.SafeParseDouble( "VelocityWinter") ?? 0;
          StreamClasses.Add(sc.StreamType, sc);
        }
        foreach (var v in Configuration.Element("DBFFiles").Elements("DBFFile"))
        {
          var dbf = new SafeFile();
          dbf.FileName = v.SafeParseString("FileName");
          dbf.ColumnNames.Add(v.SafeParseString("IDColumn"));
          dbf.ColumnNames.Add(v.SafeParseString("NameColumn"));
          dbf.ColumnNames.Add(v.SafeParseString("LengthColumn"));
          dbf.ColumnNames.Add(v.SafeParseString("LRColumn"));
          this.DBFFiles.Add(dbf);
        }
      }

    }