private static void FillAddressInfo(System.ServiceModel.Administration.EndpointInfo endpoint, IWmiInstance instance)
 {
     string[] info = new string[endpoint.Headers.Count];
     int num = 0;
     foreach (AddressHeader header in endpoint.Headers)
     {
         PlainXmlWriter writer = new PlainXmlWriter();
         header.WriteAddressHeader(writer);
         info[num++] = writer.ToString();
     }
     ProviderBase.FillCollectionInfo(info, instance, "AddressHeaders");
     instance.SetProperty("Address", (endpoint.Address == null) ? string.Empty : endpoint.Address.ToString());
     instance.SetProperty("ListenUri", (endpoint.ListenUri == null) ? string.Empty : endpoint.ListenUri.ToString());
     instance.SetProperty("AddressIdentity", (endpoint.Identity == null) ? string.Empty : endpoint.Identity.ToString());
 }
 static void FillAddressInfo(EndpointInfo endpoint, IWmiInstance instance)
 {
     Fx.Assert(null != endpoint, "");
     Fx.Assert(null != instance, "");
     string[] headers = new string[endpoint.Headers.Count];
     int i = 0;
     foreach (AddressHeader header in endpoint.Headers)
     {
         PlainXmlWriter xmlWriter = new PlainXmlWriter();
         header.WriteAddressHeader(xmlWriter);
         headers[i++] = xmlWriter.ToString();
     }
     ProviderBase.FillCollectionInfo(headers, instance, AdministrationStrings.AddressHeaders);
     instance.SetProperty(AdministrationStrings.Address, endpoint.Address == null ? String.Empty : endpoint.Address.ToString());
     instance.SetProperty(AdministrationStrings.ListenUri, endpoint.ListenUri == null ? String.Empty : endpoint.ListenUri.ToString());
     instance.SetProperty(AdministrationStrings.Identity, endpoint.Identity == null ? String.Empty : endpoint.Identity.ToString());
 }