public static SortedDictionary<long, StructureType> GetStructureTypes(AnnotateStructureTypesClient proxy) { SortedDictionary<long, StructureType> dictTypes = new SortedDictionary<long, StructureType>(); StructureType[] StructureTypes = proxy.GetStructureTypes(); foreach (StructureType type in StructureTypes) { dictTypes.Add(type.ID, type); } return dictTypes; }
public static AnnotateStructureTypesClient CreateStructureTypeClient() { AnnotateStructureTypesClient proxy = new AnnotateStructureTypesClient(); proxy.Endpoint.Address = new System.ServiceModel.EndpointAddress(State.serviceDictionary[State.selectedService]); proxy.ClientCredentials.UserName.UserName = userCredentials.UserName; proxy.ClientCredentials.UserName.Password = userCredentials.Password; // if(proxy.State != System.ServiceModel.CommunicationState.Opened) // proxy.Open(); return proxy; }