public string ParentID; // The project-unique ID of the endpoint's container. /// <summary> /// Initialize Endpoint info from an endpoint. /// </summary> /// <param name="endpoint">The endpoint of interest.</param> public Endpoint(InterfaceFCO endpoint, InterfaceReference epReference) { const string defaultString = "unknown"; Name = defaultString; Kind = defaultString; ID = defaultString; ParentName = defaultString; ParentKind = defaultString; ParentID = defaultString; if (endpoint != null) { if (endpoint.Name != null) { Name = endpoint.Name; } if (endpoint.Kind != null) { Kind = endpoint.Kind; } if (endpoint.ID != null) { ID = endpoint.ID; } if (endpoint.ParentContainer != null) { if (endpoint.ParentContainer.Name != null) { ParentName = endpoint.ParentContainer.Name; } if (endpoint.ParentContainer.Kind != null) { ParentKind = endpoint.ParentContainer.Kind; } if (endpoint.ParentContainer.ID != null) { ParentID = endpoint.ParentContainer.ID; } } // If the endpoint reference exists, use it to get the parent name. if (epReference != null) { ParentName = epReference.Name; ID += "/" + epReference.ID; ParentID = epReference.ID; } } }
public string ParentID; // The project-unique ID of the endpoint's container. /// <summary> /// Initialize Endpoint info from an endpoint. /// </summary> /// <param name="endpoint">The endpoint of interest.</param> public Endpoint(InterfaceFCO endpoint, InterfaceReference epReference) { const string defaultString = "unknown"; Name = defaultString; Kind = defaultString; ID = defaultString; ParentName = defaultString; ParentKind = defaultString; ParentID = defaultString; if (endpoint != null) { if (endpoint.Name != null) { Name = endpoint.Name; } if (endpoint.Kind != null) { Kind = endpoint.Kind; } if (endpoint.ID != null) { ID = endpoint.ID; } if (endpoint.ParentContainer != null) { if (endpoint.ParentContainer.Name != null) { ParentName = endpoint.ParentContainer.Name; } if (endpoint.ParentContainer.Kind != null) { ParentKind = endpoint.ParentContainer.Kind; } if (endpoint.ParentContainer.ID != null) { ParentID = endpoint.ParentContainer.ID; } } // If the endpoint reference exists, use it to get the parent name. if (epReference != null) { ParentName = epReference.Name; ID += "/" + epReference.ID; ParentID = epReference.ID; } } }