Code:
/ DotNET / DotNET / 8.0 / untmp / Orcas / RTM / ndp / fx / src / xsp / System / Web / Extensions / Compilation / WCFModel / MetadataSource.cs / 1 / MetadataSource.cs
//------------------------------------------------------------------------------ //// Copyright (C) Microsoft Corporation. All Rights Reserved. // //----------------------------------------------------------------------------- // // This code is shared between ndp\fx\src\xsp\System\Web\Extensions\Compilation\WCFModel // and wizard\vsdesigner\designer\microsoft\vsdesigner\WCFModel. // Please make sure the code files between those two directories are alway in sync when you make any changes to this code. // And always test these code in both places before check in. // The code under ndp\fx\src\xsp\System\Web\Extensions\Compilation\XmlSerializer might have to be regerenated when // the format of the svcmap file is changed, or class structure has been changed in this directory. Please follow the HowTo file // under Compilation directory to see how to regerenate that code. // using System; using System.Diagnostics; using System.Globalization; #if WEB_EXTENSIONS_CODE using System.Web.Resources; #else using Microsoft.VSDesigner.Resources.Microsoft.VSDesigner; #endif using XmlSerialization = System.Xml.Serialization; #if WEB_EXTENSIONS_CODE namespace System.Web.Compilation.WCFModel #else namespace Microsoft.VSDesigner.WCFModel #endif { ////// This class implements a MetadataSource item in the svcmap file /// ///#if WEB_EXTENSIONS_CODE internal class MetadataSource #else [CLSCompliant(true)] public class MetadataSource #endif { // URL of metadata source private string m_Address; // protocol to download it private string m_Protocol; // ID of this source private int m_SourceId; /// /// Constructor /// ///Must support a default construct for XmlSerializer public MetadataSource() { m_Address = String.Empty; m_Protocol = String.Empty; } ////// Constructor /// /// /// /// public MetadataSource(string protocol, string address, int sourceId) { if (protocol == null) { throw new ArgumentNullException("protocol"); } if (address == null) { throw new ArgumentNullException("address"); } if (protocol.Length == 0) { throw new ArgumentException(WCFModelStrings.ReferenceGroup_EmptyProtocol); } if (address == null) { throw new ArgumentException(WCFModelStrings.ReferenceGroup_EmptyAddress); } m_Protocol = protocol; m_Address = address; if (sourceId < 0) { Debug.Fail("Source ID shouldn't be a nagtive number"); throw new ArgumentException(WCFModelStrings.ReferenceGroup_InvalidSourceId); } m_SourceId = sourceId; } ////// URL address to download metadata /// ////// [XmlSerialization.XmlAttribute()] public string Address { get { return m_Address; } set { if (value == null) { throw new ArgumentNullException("value"); } m_Address = value; } } /// /// protocol used to download metadata /// ////// [XmlSerialization.XmlAttribute()] public string Protocol { get { return m_Protocol; } set { if (value == null) { throw new ArgumentNullException("value"); } m_Protocol = value; } } /// /// generated ID for this metadata source /// ////// [XmlSerialization.XmlAttribute()] public int SourceId { get { return m_SourceId; } set { if (value < 0) { Debug.Fail("Source ID shouldn't be a nagtive number"); throw new ArgumentException(WCFModelStrings.ReferenceGroup_InvalidSourceId); } m_SourceId = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ResourceType.cs
- DataGridViewCellLinkedList.cs
- NavigationCommands.cs
- XmlWellformedWriter.cs
- MarshalByValueComponent.cs
- BlurEffect.cs
- GridSplitter.cs
- GridItemCollection.cs
- DesignTimeData.cs
- AdjustableArrowCap.cs
- FormsAuthenticationUserCollection.cs
- InvocationExpression.cs
- FileDialogCustomPlace.cs
- ProgressBarBrushConverter.cs
- XmlTextAttribute.cs
- SoapHeaders.cs
- DecimalConstantAttribute.cs
- ReferenceAssemblyAttribute.cs
- XamlSerializer.cs
- ViewGenerator.cs
- SettingsProviderCollection.cs
- FindCriteriaApril2005.cs
- State.cs
- WebPartDisplayModeEventArgs.cs
- Viewport3DAutomationPeer.cs
- CacheChildrenQuery.cs
- List.cs
- ServiceOperationUIEditor.cs
- FrameworkElement.cs
- Boolean.cs
- WebBrowserNavigatingEventHandler.cs
- SqlPersonalizationProvider.cs
- AssemblyFilter.cs
- MissingMemberException.cs
- AmbiguousMatchException.cs
- ContentType.cs
- DnsEndPoint.cs
- CodeIndexerExpression.cs
- AsyncContentLoadedEventArgs.cs
- CachedFontFace.cs
- SystemColors.cs
- SqlConnection.cs
- GeneratedCodeAttribute.cs
- TextRangeBase.cs
- SequentialOutput.cs
- InlineObject.cs
- UnsafeNativeMethods.cs
- DbMetaDataCollectionNames.cs
- XmlAttributeCache.cs
- MimeMultiPart.cs
- CounterSampleCalculator.cs
- FixedSOMTable.cs
- invalidudtexception.cs
- ContextQuery.cs
- CheckoutException.cs
- _NativeSSPI.cs
- GroupDescription.cs
- SingleAnimation.cs
- XappLauncher.cs
- RightsManagementInformation.cs
- SQLRoleProvider.cs
- TemplateManager.cs
- StateDesigner.LayoutSelectionGlyph.cs
- XmlTextReaderImplHelpers.cs
- TableNameAttribute.cs
- XmlSignificantWhitespace.cs
- EntryWrittenEventArgs.cs
- TableLayout.cs
- DoubleLinkListEnumerator.cs
- RichTextBoxConstants.cs
- ListViewItem.cs
- WebPartsPersonalizationAuthorization.cs
- ToolStripButton.cs
- ToolStripOverflow.cs
- EventProviderWriter.cs
- OleDbReferenceCollection.cs
- FixUp.cs
- PageBuildProvider.cs
- ChangeDirector.cs
- UriTemplateEquivalenceComparer.cs
- newinstructionaction.cs
- DelegateSerializationHolder.cs
- EntityDataSourceWrapper.cs
- DataControlButton.cs
- MethodImplAttribute.cs
- HttpHandlerActionCollection.cs
- IOException.cs
- WindowHideOrCloseTracker.cs
- UInt16Converter.cs
- RewritingPass.cs
- SiteMap.cs
- LambdaSerializationException.cs
- SqlDependency.cs
- DataDocumentXPathNavigator.cs
- PageStatePersister.cs
- ContentDisposition.cs
- Geometry3D.cs
- LinkLabelLinkClickedEvent.cs
- AnimationTimeline.cs
- PointCollection.cs