public void CreateEnergyUsage()
        {
            BinaryData binaryData = new BinaryData() { Value = "urn:sif:school:AcmeMiddleSchool1.CoyoteDistrict.Arizona" };
            UsageLocationInfo usageLocationInfo = new UsageLocationInfo() { SchoolId = binaryData };

            ReadingData readingData = new ReadingData() { EnergyUnits = "$Kilowatt-Hour" };
            ReadingDataList readingDataList = new ReadingDataList() { readingData };
            DataSource dataSource = new DataSource() { ReadingDataList = readingDataList };

            EnergyUsage energyUsage = new EnergyUsage() { UsageLocationInfo = usageLocationInfo, DataSource = dataSource };

            if (log.IsDebugEnabled) log.Debug("EnergyUsage instance: " + energyUsage.ToXml());
            Console.WriteLine("EnergyUsage instance: " + energyUsage.ToXml());
        }
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="usageLocationInfo">Complex element containing the location of where measurements apply to.</param>
 ///
 public EnergyUsage( UsageLocationInfo usageLocationInfo )
     : base(Adk.SifVersion, EnergymanagementDTD.ENERGYUSAGE)
 {
     this.UsageLocationInfo = usageLocationInfo;
 }
Exemple #3
0
 /// <summary>
 /// Constructor that accepts values for all mandatory fields
 /// </summary>
 ///<param name="usageLocationInfo">Complex element containing the location of where measurements apply to.</param>
 ///
 public EnergyUsage(UsageLocationInfo usageLocationInfo) : base(Adk.SifVersion, EnergymanagementDTD.ENERGYUSAGE)
 {
     this.UsageLocationInfo = usageLocationInfo;
 }