private oval_system_characteristics CreateSystemCharacteristicsBySpecificSystemInfo(IEnumerable<oval_system_characteristics> systemCharacteristics, SystemInfoType systemInfo)
        {
            SystemCharacteristicsBuilder builder = new SystemCharacteristicsBuilder();
            var generator = (systemCharacteristics.Count() > 0) ? systemCharacteristics.ElementAt(0).generator : DocumentHelpers.GetDefaultGenerator();
            return builder.WithGenerator(generator)
                        .WithSystemInfo(systemInfo)
                        .WithCollectedObjectAndSystemDataByTheSystemCharacteristicList(systemCharacteristics)
                        .Build();

        }
 /// <summary>
 /// Gets the system info.
 /// The system info are informations about the station that was executed the collect.
 /// </summary>
 /// <param name="probeResult">The probe result.</param>
 /// <returns></returns>
 private SystemInfoType GetSystemInfo(ProbeResult probeResult)
 {
     SystemInfoType systemInfo = new SystemInfoType();
     if (probeResult.SystemInformation != null)
     {
         systemInfo.architecture = probeResult.SystemInformation.Architecture;
         systemInfo.os_name = probeResult.SystemInformation.SystemName;
         systemInfo.os_version = probeResult.SystemInformation.SystemVersion;
         systemInfo.primary_host_name = probeResult.SystemInformation.PrimaryHostName;
         systemInfo.interfaces = new InterfaceType[probeResult.SystemInformation.Interfaces.Count()];
         for (int i = 0; i <= (probeResult.SystemInformation.Interfaces.Count - 1); i++)
         {
             NetworkInterface networkInterface = probeResult.SystemInformation.Interfaces[i];
             InterfaceType interfaceType = new InterfaceType();
             interfaceType.interface_name = networkInterface.Name;
             interfaceType.ip_address = new EntityItemIPAddressStringType()
             {
                 datatype = SimpleDatatypeEnumeration.ipv4_address,
                 Value = networkInterface.IpAddress
             };
             interfaceType.mac_address = networkInterface.MacAddress;
             systemInfo.interfaces[i] = interfaceType;
         }
     }
     return systemInfo;
 }
 private SystemInfoType GetSystemInfo(SystemInfo systemInfo)
 {
     SystemInfoType systemInfoType = new SystemInfoType();
     if ( systemInfo != null)
     {
         systemInfoType.architecture = systemInfo.Architecture;
         systemInfoType.os_name = systemInfo.SystemName;
         systemInfoType.os_version = systemInfo.SystemVersion;
         systemInfoType.primary_host_name = systemInfo.PrimaryHostName;
         systemInfoType.interfaces = new InterfaceType[systemInfo.NetworkInterfaces.Count()];
         for (int i = 0; i <= (systemInfo.NetworkInterfaces.Count - 1); i++)
         {
             NetworkInfo networkInterface = systemInfo.NetworkInterfaces[i];
             InterfaceType interfaceType = new InterfaceType();
             interfaceType.interface_name = networkInterface.Name;
             interfaceType.ip_address = new EntityItemIPAddressStringType() { Value = networkInterface.IpAddress };
             interfaceType.mac_address = networkInterface.MacAddress;
             systemInfoType.interfaces[i] = interfaceType;
         }
     }
     return systemInfoType;
 }       
 public SystemCharacteristicsBuilder WithSystemInfo(SystemInfoType systemInfo)
 {
     systemCharacteristics.system_info = systemInfo;
     return this;
 }