本文整理汇总了C#中System.ServiceModel.Channels.AddressingVersion类的典型用法代码示例。如果您正苦于以下问题:C# AddressingVersion类的具体用法?C# AddressingVersion怎么用?C# AddressingVersion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AddressingVersion类属于System.ServiceModel.Channels命名空间,在下文中一共展示了AddressingVersion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateSequenceResponse
public CreateSequenceResponse(AddressingVersion addressingVersion,
ReliableMessagingVersion reliableMessagingVersion)
: base(true)
{
this.addressingVersion = addressingVersion;
this.reliableMessagingVersion = reliableMessagingVersion;
}
示例2: Create
public static ActionHeader Create(XmlDictionaryString dictionaryAction, AddressingVersion addressingVersion)
{
if (dictionaryAction == null)
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("action"));
if (addressingVersion == null)
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("addressingVersion");
return new DictionaryActionHeader(dictionaryAction, addressingVersion);
}
示例3: CreateSequence
public CreateSequence(AddressingVersion addressingVersion, ReliableMessagingVersion reliableMessagingVersion, bool ordered, IClientReliableChannelBinder binder, UniqueId offerIdentifier) : base(true)
{
this.addressingVersion = addressingVersion;
this.reliableMessagingVersion = reliableMessagingVersion;
this.ordered = ordered;
this.binder = binder;
this.offerIdentifier = offerIdentifier;
}
示例4: ReadHeaderValue
public static string ReadHeaderValue(XmlDictionaryReader reader, AddressingVersion addressingVersion)
{
string s = reader.ReadElementContentAsString();
if ((s.Length <= 0) || ((s[0] > ' ') && (s[s.Length - 1] > ' ')))
{
return s;
}
return XmlUtil.Trim(s);
}
示例5: ReadHeader
public static ActionHeader ReadHeader(XmlDictionaryReader reader, AddressingVersion version, string actor, bool mustUnderstand, bool relay)
{
string action = ReadHeaderValue(reader, version);
if (((actor.Length == 0) && mustUnderstand) && !relay)
{
return new ActionHeader(action, version);
}
return new FullActionHeader(action, actor, mustUnderstand, relay, version);
}
示例6: ReadHeader
public static MessageIDHeader ReadHeader(XmlDictionaryReader reader, AddressingVersion version, string actor, bool mustUnderstand, bool relay)
{
UniqueId messageId = ReadHeaderValue(reader, version);
if (((actor.Length == 0) && !mustUnderstand) && !relay)
{
return new MessageIDHeader(messageId, version);
}
return new FullMessageIDHeader(messageId, actor, mustUnderstand, relay, version);
}
示例7: ReadHeader
public static FaultToHeader ReadHeader(XmlDictionaryReader reader, AddressingVersion version, string actor, bool mustUnderstand, bool relay)
{
EndpointAddress faultTo = ReadHeaderValue(reader, version);
if (((actor.Length == 0) && !mustUnderstand) && !relay)
{
return new FaultToHeader(faultTo, version);
}
return new FullFaultToHeader(faultTo, actor, mustUnderstand, relay, version);
}
示例8: ReadHeader
public static RelatesToHeader ReadHeader(XmlDictionaryReader reader, AddressingVersion version, string actor, bool mustUnderstand, bool relay)
{
System.Xml.UniqueId id;
Uri uri;
ReadHeaderValue(reader, version, out uri, out id);
if (((actor.Length == 0) && !mustUnderstand) && (!relay && (uri == ReplyRelationshipType)))
{
return new RelatesToHeader(id, version);
}
return new FullRelatesToHeader(id, actor, mustUnderstand, relay, version);
}
示例9: Create
public static FaultToHeader Create(EndpointAddress faultTo, AddressingVersion addressingVersion)
{
if (faultTo == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("faultTo"));
}
if (addressingVersion == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("addressingVersion");
}
return new FaultToHeader(faultTo, addressingVersion);
}
示例10: Create
public static ActionHeader Create(string action, AddressingVersion addressingVersion)
{
if (action == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("action"));
}
if (addressingVersion == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("addressingVersion");
}
return new ActionHeader(action, addressingVersion);
}
示例11: Create
public static RelatesToHeader Create(System.Xml.UniqueId messageId, AddressingVersion addressingVersion)
{
if (object.ReferenceEquals(messageId, null))
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("messageId"));
}
if (addressingVersion == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("addressingVersion"));
}
return new RelatesToHeader(messageId, addressingVersion);
}
示例12: ApplyAddressingVersion
private static void ApplyAddressingVersion(MessageEncodingBindingElement encodingBindingElement, AddressingVersion addressingVersion)
{
EnvelopeVersion envelope = encodingBindingElement.MessageVersion.Envelope;
if ((envelope == EnvelopeVersion.None) && (addressingVersion != AddressingVersion.None))
{
encodingBindingElement.MessageVersion = MessageVersion.CreateVersion(EnvelopeVersion.Soap12, addressingVersion);
}
else
{
encodingBindingElement.MessageVersion = MessageVersion.CreateVersion(envelope, addressingVersion);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:MessageEncodingBindingElementImporter.cs
示例13: ReadHeaderValue
public static Uri ReadHeaderValue(XmlDictionaryReader reader, AddressingVersion version, UriCache uriCache)
{
string uriString = reader.ReadElementContentAsString();
if (uriString == version.Anonymous)
{
return version.AnonymousUri;
}
if (uriCache == null)
{
return new Uri(uriString);
}
return uriCache.CreateUri(uriString);
}
示例14: GetActionHeader
private static ActionHeader GetActionHeader(AddressingVersion addressingVersion, ReliableMessagingVersion reliableMessagingVersion, string element)
{
WsrmIndex index = null;
if (reliableMessagingVersion == ReliableMessagingVersion.WSReliableMessagingFebruary2005)
{
if (addressingVersion == AddressingVersion.WSAddressingAugust2004)
{
if (wsAddressingAug2004WSReliableMessagingFeb2005 == null)
{
wsAddressingAug2004WSReliableMessagingFeb2005 = new WsrmFeb2005Index(addressingVersion);
}
index = wsAddressingAug2004WSReliableMessagingFeb2005;
}
else if (addressingVersion == AddressingVersion.WSAddressing10)
{
if (wsAddressing10WSReliableMessagingFeb2005 == null)
{
wsAddressing10WSReliableMessagingFeb2005 = new WsrmFeb2005Index(addressingVersion);
}
index = wsAddressing10WSReliableMessagingFeb2005;
}
}
else
{
if (reliableMessagingVersion != ReliableMessagingVersion.WSReliableMessaging11)
{
throw Fx.AssertAndThrow("Reliable messaging version not supported.");
}
if (addressingVersion == AddressingVersion.WSAddressingAugust2004)
{
if (wsAddressingAug2004WSReliableMessaging11 == null)
{
wsAddressingAug2004WSReliableMessaging11 = new Wsrm11Index(addressingVersion);
}
index = wsAddressingAug2004WSReliableMessaging11;
}
else if (addressingVersion == AddressingVersion.WSAddressing10)
{
if (wsAddressing10WSReliableMessaging11 == null)
{
wsAddressing10WSReliableMessaging11 = new Wsrm11Index(addressingVersion);
}
index = wsAddressing10WSReliableMessaging11;
}
}
if (index == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ProtocolException(System.ServiceModel.SR.GetString("AddressingVersionNotSupported", new object[] { addressingVersion })));
}
return index.GetActionHeader(element);
}
示例15: Create
public static ToHeader Create(Uri to, AddressingVersion addressingVersion)
{
if (to == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("to"));
}
if (to != addressingVersion.AnonymousUri)
{
return new ToHeader(to, addressingVersion);
}
if (addressingVersion == AddressingVersion.WSAddressing10)
{
return AnonymousTo10;
}
return AnonymousTo200408;
}