private void ConfigureEndpoint(ConfiguredEndpoint endpoint)
{
EndpointComIdentity comIdentity = endpoint.ComIdentity;
if (comIdentity == null)
{
comIdentity = new EndpointComIdentity();
comIdentity.Specification = ComSpecification.DA;
endpoint.ComIdentity = comIdentity;
}
string oldProgId = PseudoComServer.CreateProgIdFromUrl(endpoint.ComIdentity.Specification, endpoint.EndpointUrl.ToString());
endpoint = new ConfiguredServerDlg().ShowDialog(endpoint, m_configuration);
if (endpoint == null)
{
return;
}
if (String.IsNullOrEmpty(comIdentity.ProgId) || oldProgId == comIdentity.ProgId)
{
comIdentity.ProgId = PseudoComServer.CreateProgIdFromUrl(endpoint.ComIdentity.Specification, endpoint.EndpointUrl.ToString());
if (comIdentity.Clsid == Guid.Empty)
{
comIdentity.Clsid = Guid.NewGuid();
}
}
m_endpoint = endpoint;
EndpointTB.Text = m_endpoint.EndpointUrl.ToString();
}