本文整理匯總了C#中BindingElementCollection類的典型用法代碼示例。如果您正苦於以下問題:C# BindingElementCollection類的具體用法?C# BindingElementCollection怎麽用?C# BindingElementCollection使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
BindingElementCollection類屬於命名空間,在下文中一共展示了BindingElementCollection類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: TryCreate
internal static bool TryCreate(BindingElementCollection bindingElements, out Binding binding)
{
if (bindingElements == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("bindingElements");
}
binding = null;
ContextBindingElement element = bindingElements.Find<ContextBindingElement>();
if (element != null)
{
Binding binding2;
BindingElementCollection elements = new BindingElementCollection(bindingElements);
elements.Remove<ContextBindingElement>();
if (WSHttpBindingBase.TryCreate(elements, out binding2))
{
bool allowCookies = ((WSHttpBinding) binding2).AllowCookies;
if ((allowCookies && (element.ContextExchangeMechanism == ContextExchangeMechanism.HttpCookie)) || (!allowCookies && (element.ContextExchangeMechanism == ContextExchangeMechanism.ContextSoapHeader)))
{
WSHttpContextBinding binding3 = new WSHttpContextBinding((WSHttpBinding) binding2) {
ContextProtectionLevel = element.ProtectionLevel,
ContextManagementEnabled = element.ContextManagementEnabled
};
binding = binding3;
}
}
}
return (binding != null);
}
示例2: CreateBindingElements
public override BindingElementCollection CreateBindingElements()
{
BindingElementCollection col = new BindingElementCollection();
col.Add(be);
col.Add(tcpbe);
return col;
}
示例3: CreateBindingElements
public override BindingElementCollection CreateBindingElements()
{
BindingElementCollection elements = new BindingElementCollection {
this.txFlow
};
if (this.reliableSession.Enabled)
{
elements.Add(this.session);
}
SecurityBindingElement item = this.CreateMessageSecurity();
if (item != null)
{
elements.Add(item);
}
WSMessageEncodingHelper.SyncUpEncodingBindingElementProperties(this.textEncoding, this.mtomEncoding);
if (this.MessageEncoding == WSMessageEncoding.Text)
{
elements.Add(this.textEncoding);
}
else if (this.MessageEncoding == WSMessageEncoding.Mtom)
{
elements.Add(this.mtomEncoding);
}
elements.Add(this.GetTransport());
return elements.Clone();
}
示例4: CreateBindingElements
public override BindingElementCollection CreateBindingElements()
{
BindingElementCollection elements = new BindingElementCollection();
elements.Add(encoding);
elements.Add(transport);
return elements;
}
示例5: CreateBindingElements
public override BindingElementCollection CreateBindingElements()
{
BindingElementCollection bindingElementsCollection = new BindingElementCollection();
bindingElementsCollection.Add(this.messageEncodingBindingElement);
bindingElementsCollection.Add(this.transportBindingElement);
return bindingElementsCollection.Clone();
}
示例6: CreateBindingElements
public override BindingElementCollection CreateBindingElements()
{
BindingElementCollection elements = new BindingElementCollection();
elements.Add(this.encodingElement);
elements.Add(this.transportElement);
return elements.Clone();
}
示例7: CreateBindingElements
public override BindingElementCollection CreateBindingElements()
{
BindingElementCollection elements = new BindingElementCollection {
this.txFlow,
this.session
};
SecurityBindingElement item = this.CreateMessageSecurity();
if (item != null)
{
elements.Add(item);
}
elements.Add(this.compositeDuplex);
elements.Add(this.oneWay);
WSMessageEncodingHelper.SyncUpEncodingBindingElementProperties(this.textEncoding, this.mtomEncoding);
if (this.MessageEncoding == WSMessageEncoding.Text)
{
elements.Add(this.textEncoding);
}
else if (this.MessageEncoding == WSMessageEncoding.Mtom)
{
elements.Add(this.mtomEncoding);
}
elements.Add(this.httpTransport);
return elements.Clone();
}
示例8: AddBindingElements
protected override void AddBindingElements(BindingElementCollection bindingElements)
{
bindingElements.Add(new BinaryMessageEncodingBindingElement());
base.AddTransactionFlowBindingElement(bindingElements);
base.AddWindowsStreamSecurityBindingElement(bindingElements);
base.AddNamedPipeBindingElement(bindingElements);
}
示例9: AddBindingElements
protected override void AddBindingElements(BindingElementCollection bindingElements)
{
base.AddCompositeDuplexBindingElement(bindingElements, this.clientBaseAddress);
base.AddOneWayBindingElement(bindingElements);
base.AddTextEncodingBindingElement(bindingElements);
base.AddInteropHttpsTransportBindingElement(bindingElements);
}
示例10: CreateBindingElements
public override BindingElementCollection CreateBindingElements()
{
BindingElementCollection elemens = new BindingElementCollection();
elemens.Add(new TextMessageEncodingBindingElement());
elemens.Add(new MyBindingElement());
elemens.Add(new HttpTransportBindingElement());
return elemens.Clone();
}
示例11: CreateBindingElements
public override BindingElementCollection CreateBindingElements()
{
var res = new BindingElementCollection();
res.Add(new TextMessageEncodingBindingElement() { MessageVersion = this.messageVersion });
res.Add(SecurityBindingElement.CreateUserNameOverTransportBindingElement());
res.Add(new AutoSecuredHttpTransportElement());
return res;
}
示例12: AddBindingElements
protected override void AddBindingElements(BindingElementCollection bindingElements)
{
if (this.supportingTokenBE != null)
{
base.AddTransportSecurityBindingElement(bindingElements);
bindingElements.Add(this.supportingTokenBE);
}
base.AddBindingElements(bindingElements);
}
示例13: CreateBindingElements
public override BindingElementCollection CreateBindingElements()
{
BindingElementCollection elements = new BindingElementCollection();
if (security != null) elements.Add(security);
elements.Add(messageEncoding);
elements.Add(transport);
return elements.Clone();
}
示例14: AddWindowsHttpsTransportBindingElement
private void AddWindowsHttpsTransportBindingElement(BindingElementCollection bindingElements)
{
HttpsTransportBindingElement item = new HttpsTransportBindingElement {
RequireClientCertificate = false,
UseDefaultWebProxy = false,
AuthenticationScheme = AuthenticationSchemes.Negotiate
};
bindingElements.Add(item);
}
示例15: CreateBindingElements
public override BindingElementCollection CreateBindingElements()
{
BindingElementCollection elements = new BindingElementCollection();
elements.Add(this._trafficControlBindingElement);
elements.Add(this._messageEncodingBindingElement);
//elements.Add(this._symmetricSecurityBindingElement);
//elements.Add(this._transactionFlowBindingElement);
elements.Add(this._transportBindingElement);
return elements.Clone();
}