Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / UnrecognizedAssertionsBindingElement.cs / 1 / UnrecognizedAssertionsBindingElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Xml; using System.ServiceModel.Description; using System.Xml.Schema; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using WsdlNS = System.Web.Services.Description; using System.Text; using System.ComponentModel; using System.Diagnostics; internal class UnrecognizedAssertionsBindingElement : BindingElement { XmlQualifiedName wsdlBinding; ICollectionbindingAsserions; IDictionary > operationAssertions; IDictionary > messageAssertions; internal protected UnrecognizedAssertionsBindingElement(XmlQualifiedName wsdlBinding, ICollection bindingAsserions) { DiagnosticUtility.DebugAssert(wsdlBinding != null, ""); this.wsdlBinding = wsdlBinding; this.bindingAsserions = bindingAsserions; } internal XmlQualifiedName WsdlBinding { get { return this.wsdlBinding; } } internal ICollection BindingAsserions { get { if (this.bindingAsserions == null) this.bindingAsserions = new Collection (); return this.bindingAsserions; } } internal IDictionary > OperationAssertions { get { if (this.operationAssertions == null) this.operationAssertions = new Dictionary >(); return this.operationAssertions; } } internal IDictionary > MessageAssertions { get { if (this.messageAssertions == null) this.messageAssertions = new Dictionary >(); return this.messageAssertions; } } internal void Add(OperationDescription operation, ICollection assertions) { ICollection existent; if (!OperationAssertions.TryGetValue(operation, out existent)) { OperationAssertions.Add(operation, assertions); } else { foreach (XmlElement assertion in assertions) existent.Add(assertion); } } internal void Add(MessageDescription message, ICollection assertions) { ICollection existent; if (!MessageAssertions.TryGetValue(message, out existent)) { MessageAssertions.Add(message, assertions); } else { foreach (XmlElement assertion in assertions) existent.Add(assertion); } } protected UnrecognizedAssertionsBindingElement(UnrecognizedAssertionsBindingElement elementToBeCloned) : base(elementToBeCloned) { this.wsdlBinding = elementToBeCloned.wsdlBinding; this.bindingAsserions = elementToBeCloned.bindingAsserions; this.operationAssertions = elementToBeCloned.operationAssertions; this.messageAssertions = elementToBeCloned.messageAssertions; } public override T GetProperty (BindingContext context) { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("context"); } return context.GetInnerProperty (); } public override BindingElement Clone() { //throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.UnsupportedBindingElementClone, typeof(UnrecognizedAssertionsBindingElement).Name))); // do not allow Cloning, return an empty BindingElement return new UnrecognizedAssertionsBindingElement(new XmlQualifiedName(wsdlBinding.Name, wsdlBinding.Namespace), null); } } } // 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
- HwndAppCommandInputProvider.cs
- FormViewInsertEventArgs.cs
- HttpWebRequest.cs
- CollectionBase.cs
- HtmlToClrEventProxy.cs
- BinaryCommonClasses.cs
- InterleavedZipPartStream.cs
- LinearGradientBrush.cs
- Int32Rect.cs
- FixedSOMPage.cs
- IntegerFacetDescriptionElement.cs
- ConditionalAttribute.cs
- TimelineGroup.cs
- IdnMapping.cs
- TextureBrush.cs
- XamlDebuggerXmlReader.cs
- BuildDependencySet.cs
- HtmlLink.cs
- DecoderExceptionFallback.cs
- TextEditor.cs
- UserMapPath.cs
- XmlSchemaChoice.cs
- SiteMapPath.cs
- TextSelectionHelper.cs
- SchemaElementLookUpTableEnumerator.cs
- MarshalByRefObject.cs
- SchemeSettingElement.cs
- PenThread.cs
- ExpandCollapseIsCheckedConverter.cs
- WaitingCursor.cs
- BooleanConverter.cs
- StreamSecurityUpgradeAcceptorAsyncResult.cs
- TopClause.cs
- RequestStatusBarUpdateEventArgs.cs
- TileBrush.cs
- PartitionResolver.cs
- DbSetClause.cs
- HwndHostAutomationPeer.cs
- FixedSOMLineRanges.cs
- XsltSettings.cs
- SqlParameter.cs
- PtsHelper.cs
- ScriptRegistrationManager.cs
- HttpCookie.cs
- TagPrefixAttribute.cs
- SystemPens.cs
- MaskPropertyEditor.cs
- ToolboxSnapDragDropEventArgs.cs
- XslTransform.cs
- TileModeValidation.cs
- XmlEncodedRawTextWriter.cs
- CommentEmitter.cs
- UnsafeNativeMethods.cs
- GacUtil.cs
- RoutedEventConverter.cs
- MenuEventArgs.cs
- WebPartCloseVerb.cs
- TerminatorSinks.cs
- FtpWebRequest.cs
- IItemContainerGenerator.cs
- MouseWheelEventArgs.cs
- BitmapMetadataEnumerator.cs
- WebPartMinimizeVerb.cs
- Brush.cs
- SignatureDescription.cs
- ExceptionUtil.cs
- CookieParameter.cs
- WebRequestModuleElement.cs
- UdpDiscoveryEndpointElement.cs
- MenuItem.cs
- GenericAuthenticationEventArgs.cs
- HeaderedItemsControl.cs
- PersonalizablePropertyEntry.cs
- EventLogException.cs
- DeviceContexts.cs
- Pen.cs
- SocketElement.cs
- CodeIdentifiers.cs
- TemplateBindingExtensionConverter.cs
- CodeChecksumPragma.cs
- MethodCallConverter.cs
- WebPartDisplayModeCollection.cs
- DataGridTemplateColumn.cs
- StringKeyFrameCollection.cs
- DesignParameter.cs
- ToolStripOverflow.cs
- ConfigurationErrorsException.cs
- DbLambda.cs
- TypeSystemProvider.cs
- Polygon.cs
- ErrorFormatterPage.cs
- SqlConnectionHelper.cs
- KnownTypeAttribute.cs
- DocumentViewerAutomationPeer.cs
- InvalidComObjectException.cs
- CommittableTransaction.cs
- UriSectionReader.cs
- ThicknessAnimationUsingKeyFrames.cs
- CompositeDataBoundControl.cs
- HtmlProps.cs