예제 #1
0
        void Add(ServiceDescription description)
        {
            var    items    = new List <ServiceItem>();
            string name     = ServiceReferenceHelper.GetServiceName(description);
            var    rootNode = new ServiceItem(name);

            rootNode.Tag = description;

            foreach (Service service in description.Services)
            {
                var serviceNode = new ServiceItem(service.Name);
                serviceNode.Tag = service;
                items.Add(serviceNode);
                foreach (PortType portType  in description.PortTypes)
                {
                    var portNode = new ServiceItem("Icons.16x16.Interface", portType.Name);
                    portNode.Tag = portType;
                    serviceNode.SubItems.Add(portNode);
                }
            }
            ServiceItems = items;
        }
        void Add(ServiceDescription description)
        {
            var items = new List<ServiceItem>();
            string name = ServiceReferenceHelper.GetServiceName(description);
            var rootNode = new ServiceItem(name);
            rootNode.Tag = description;

            foreach (Service service in description.Services) {
                var serviceNode = new ServiceItem(service.Name);
                serviceNode.Tag = service;
                items.Add(serviceNode);
                foreach (PortType portType  in description.PortTypes) {
                    var portNode = new ServiceItem("Icons.16x16.Interface", portType.Name);
                    portNode.Tag = portType;
                    serviceNode.SubItems.Add(portNode);
                }
            }
            ServiceItems = items;
        }
		void Add(ServiceDescription description)
		{
			List<ServiceItem> items = new List<ServiceItem>();
			var name = ServiceReferenceHelper.GetServiceName(description);
			var rootNode = new ServiceItem(null, name);
			rootNode.Tag = description;

			foreach(Service service in description.Services) {
				var serviceNode = new ServiceItem(null, service.Name);
				serviceNode.Tag = service;
				items.Add(serviceNode);
				foreach (PortType portType  in description.PortTypes) {
					var portNode = new ServiceItem(PresentationResourceService.GetBitmapSource("Icons.16x16.Interface"), portType.Name);
					portNode.Tag = portType;
					serviceNode.SubItems.Add(portNode);
				}
			}
			ServiceItems = items;
		}