Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Web / System / Web / Services / Description / ServiceDescriptions.cs / 1305376 / ServiceDescriptions.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Services.Description { using System.Xml; using System.Xml.Serialization; using System.Xml.Schema; using System.Collections; using System; using System.IO; using System.ComponentModel; ////// /// public sealed class ServiceDescriptionCollection : ServiceDescriptionBaseCollection { ///[To be supplied.] ////// /// public ServiceDescriptionCollection() : base(null) { } ///[To be supplied.] ////// /// public ServiceDescription this[int index] { get { return (ServiceDescription)List[index]; } set { List[index] = value; } } ///[To be supplied.] ////// /// public ServiceDescription this[string ns] { get { return (ServiceDescription)Table[ns]; } } ///[To be supplied.] ////// /// public int Add(ServiceDescription serviceDescription) { return List.Add(serviceDescription); } ///[To be supplied.] ////// /// public void Insert(int index, ServiceDescription serviceDescription) { List.Insert(index, serviceDescription); } ///[To be supplied.] ////// /// public int IndexOf(ServiceDescription serviceDescription) { return List.IndexOf(serviceDescription); } ///[To be supplied.] ////// /// public bool Contains(ServiceDescription serviceDescription) { return List.Contains(serviceDescription); } ///[To be supplied.] ////// /// public void Remove(ServiceDescription serviceDescription) { List.Remove(serviceDescription); } ///[To be supplied.] ////// /// public void CopyTo(ServiceDescription[] array, int index) { List.CopyTo(array, index); } ///[To be supplied.] ////// /// protected override string GetKey(object value) { string ns = ((ServiceDescription)value).TargetNamespace; if (ns == null) return string.Empty; return ns; } Exception ItemNotFound(XmlQualifiedName name, string type) { return new Exception(Res.GetString(Res.WebDescriptionMissingItem, type, name.Name, name.Namespace)); } ///[To be supplied.] ////// /// public Message GetMessage(XmlQualifiedName name) { ServiceDescription sd = GetServiceDescription(name); Message message = null; while(message == null && sd != null) { message = sd.Messages[name.Name]; sd = sd.Next; } if (message == null) throw ItemNotFound(name, "message"); return message; } ///[To be supplied.] ////// /// public PortType GetPortType(XmlQualifiedName name) { ServiceDescription sd = GetServiceDescription(name); PortType portType = null; while(portType == null && sd != null) { portType = sd.PortTypes[name.Name]; sd = sd.Next; } if (portType == null) throw ItemNotFound(name, "message"); return portType; } ///[To be supplied.] ////// /// public Service GetService(XmlQualifiedName name) { ServiceDescription sd = GetServiceDescription(name); Service service = null; while(service == null && sd != null) { service = sd.Services[name.Name]; sd = sd.Next; } if (service == null) throw ItemNotFound(name, "service"); return service; } ///[To be supplied.] ////// /// public Binding GetBinding(XmlQualifiedName name) { ServiceDescription sd = GetServiceDescription(name); Binding binding = null; while(binding == null && sd != null) { binding = sd.Bindings[name.Name]; sd = sd.Next; } if (binding == null) throw ItemNotFound(name, "binding"); return binding; } ServiceDescription GetServiceDescription(XmlQualifiedName name) { ServiceDescription serviceDescription = this[name.Namespace]; if (serviceDescription == null) { throw new ArgumentException(Res.GetString(Res.WebDescriptionMissing, name.ToString(), name.Namespace), "name"); } return serviceDescription; } ///[To be supplied.] ////// /// protected override void SetParent(object value, object parent) { ((ServiceDescription)value).SetParent((ServiceDescriptionCollection)parent); } ///[To be supplied.] ////// /// protected override void OnInsertComplete(int index, object value) { string key = GetKey(value); if (key != null) { ServiceDescription item = (ServiceDescription)Table[key]; ((ServiceDescription)value).Next = (ServiceDescription)Table[key]; Table[key] = value; } SetParent(value, this); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //[To be supplied.] ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Services.Description { using System.Xml; using System.Xml.Serialization; using System.Xml.Schema; using System.Collections; using System; using System.IO; using System.ComponentModel; ////// /// public sealed class ServiceDescriptionCollection : ServiceDescriptionBaseCollection { ///[To be supplied.] ////// /// public ServiceDescriptionCollection() : base(null) { } ///[To be supplied.] ////// /// public ServiceDescription this[int index] { get { return (ServiceDescription)List[index]; } set { List[index] = value; } } ///[To be supplied.] ////// /// public ServiceDescription this[string ns] { get { return (ServiceDescription)Table[ns]; } } ///[To be supplied.] ////// /// public int Add(ServiceDescription serviceDescription) { return List.Add(serviceDescription); } ///[To be supplied.] ////// /// public void Insert(int index, ServiceDescription serviceDescription) { List.Insert(index, serviceDescription); } ///[To be supplied.] ////// /// public int IndexOf(ServiceDescription serviceDescription) { return List.IndexOf(serviceDescription); } ///[To be supplied.] ////// /// public bool Contains(ServiceDescription serviceDescription) { return List.Contains(serviceDescription); } ///[To be supplied.] ////// /// public void Remove(ServiceDescription serviceDescription) { List.Remove(serviceDescription); } ///[To be supplied.] ////// /// public void CopyTo(ServiceDescription[] array, int index) { List.CopyTo(array, index); } ///[To be supplied.] ////// /// protected override string GetKey(object value) { string ns = ((ServiceDescription)value).TargetNamespace; if (ns == null) return string.Empty; return ns; } Exception ItemNotFound(XmlQualifiedName name, string type) { return new Exception(Res.GetString(Res.WebDescriptionMissingItem, type, name.Name, name.Namespace)); } ///[To be supplied.] ////// /// public Message GetMessage(XmlQualifiedName name) { ServiceDescription sd = GetServiceDescription(name); Message message = null; while(message == null && sd != null) { message = sd.Messages[name.Name]; sd = sd.Next; } if (message == null) throw ItemNotFound(name, "message"); return message; } ///[To be supplied.] ////// /// public PortType GetPortType(XmlQualifiedName name) { ServiceDescription sd = GetServiceDescription(name); PortType portType = null; while(portType == null && sd != null) { portType = sd.PortTypes[name.Name]; sd = sd.Next; } if (portType == null) throw ItemNotFound(name, "message"); return portType; } ///[To be supplied.] ////// /// public Service GetService(XmlQualifiedName name) { ServiceDescription sd = GetServiceDescription(name); Service service = null; while(service == null && sd != null) { service = sd.Services[name.Name]; sd = sd.Next; } if (service == null) throw ItemNotFound(name, "service"); return service; } ///[To be supplied.] ////// /// public Binding GetBinding(XmlQualifiedName name) { ServiceDescription sd = GetServiceDescription(name); Binding binding = null; while(binding == null && sd != null) { binding = sd.Bindings[name.Name]; sd = sd.Next; } if (binding == null) throw ItemNotFound(name, "binding"); return binding; } ServiceDescription GetServiceDescription(XmlQualifiedName name) { ServiceDescription serviceDescription = this[name.Namespace]; if (serviceDescription == null) { throw new ArgumentException(Res.GetString(Res.WebDescriptionMissing, name.ToString(), name.Namespace), "name"); } return serviceDescription; } ///[To be supplied.] ////// /// protected override void SetParent(object value, object parent) { ((ServiceDescription)value).SetParent((ServiceDescriptionCollection)parent); } ///[To be supplied.] ////// /// protected override void OnInsertComplete(int index, object value) { string key = GetKey(value); if (key != null) { ServiceDescription item = (ServiceDescription)Table[key]; ((ServiceDescription)value).Next = (ServiceDescription)Table[key]; Table[key] = value; } SetParent(value, this); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ReadOnlyCollectionBase.cs
- ExceptionList.cs
- StringFunctions.cs
- AutoResetEvent.cs
- FileSecurity.cs
- ManualResetEvent.cs
- RIPEMD160.cs
- ImageList.cs
- HtmlFormParameterWriter.cs
- FlowDocumentPage.cs
- FileUpload.cs
- SynchronizationLockException.cs
- ResolveMatchesMessage11.cs
- OleDbParameter.cs
- xdrvalidator.cs
- OracleDateTime.cs
- SecureStringHasher.cs
- EventTask.cs
- ResourceKey.cs
- MissingSatelliteAssemblyException.cs
- ThreadStateException.cs
- CountAggregationOperator.cs
- MethodCallTranslator.cs
- RuntimeComponentFilter.cs
- SafeLibraryHandle.cs
- _SingleItemRequestCache.cs
- EncryptedXml.cs
- LinkedDataMemberFieldEditor.cs
- CodeAttributeDeclaration.cs
- IisNotInstalledException.cs
- PolyBezierSegmentFigureLogic.cs
- SqlReferenceCollection.cs
- FormsAuthenticationUser.cs
- ItemAutomationPeer.cs
- panel.cs
- DbConnectionStringBuilder.cs
- IgnoreFileBuildProvider.cs
- ArrangedElement.cs
- EditorZoneBase.cs
- FormViewDeleteEventArgs.cs
- GraphicsPath.cs
- CodeConditionStatement.cs
- PerfCounters.cs
- OnOperation.cs
- ScrollPatternIdentifiers.cs
- HwndTarget.cs
- ModulesEntry.cs
- XmlSchemaRedefine.cs
- TypeUtils.cs
- StatusStrip.cs
- DataReceivedEventArgs.cs
- FloatUtil.cs
- ListViewSortEventArgs.cs
- CustomCategoryAttribute.cs
- PropertyChangingEventArgs.cs
- ScrollBarRenderer.cs
- DataGridViewMethods.cs
- MSAANativeProvider.cs
- DataTableClearEvent.cs
- DiagnosticsConfigurationHandler.cs
- XmlSchemaElement.cs
- ToolStripButton.cs
- TextTrailingCharacterEllipsis.cs
- OdbcError.cs
- TextSegment.cs
- TextSpan.cs
- SQLRoleProvider.cs
- SignatureToken.cs
- OracleRowUpdatedEventArgs.cs
- MouseBinding.cs
- ImpersonationContext.cs
- UDPClient.cs
- CompositionAdorner.cs
- DrawingVisual.cs
- PersistChildrenAttribute.cs
- ClientTargetSection.cs
- Documentation.cs
- ThrowOnMultipleAssignment.cs
- TargetPerspective.cs
- StateWorkerRequest.cs
- PropertyNames.cs
- XmlKeywords.cs
- FocusChangedEventArgs.cs
- Padding.cs
- SudsParser.cs
- RepeatButton.cs
- IconConverter.cs
- _ConnectOverlappedAsyncResult.cs
- _BufferOffsetSize.cs
- VerticalConnector.xaml.cs
- HttpDictionary.cs
- Processor.cs
- ChannelBase.cs
- Viewport3DVisual.cs
- FormatterServicesNoSerializableCheck.cs
- DrawTreeNodeEventArgs.cs
- SerializationStore.cs
- DatagridviewDisplayedBandsData.cs
- WindowInteractionStateTracker.cs
- DataStorage.cs