XdsObjects Help file
MedicalConnections.Security Namespace / TlsClientNone Class / ModifyBindings Method
Details of the existing (modifiable) bindings and the connection being made
Example



In This Topic
    ModifyBindings Method (TlsClientNone)
    In This Topic
    Overridable method to allow implementation of custom bindings
    Syntax
    Public Sub ModifyBindings( _
       ByVal args As ModifyBindingsArgs _
    ) 
    Dim instance As TlsClientNone
    Dim args As ModifyBindingsArgs
     
    instance.ModifyBindings(args)
    public void ModifyBindings( 
       ModifyBindingsArgs args
    )
    public:
    void ModifyBindings( 
       ModifyBindingsArgs^ args
    ) 

    Parameters

    args
    Details of the existing (modifiable) bindings and the connection being made
    Remarks

    This provides an extensible and flexible method to allow the bindings to be modified - e.g. (in conjunction with ModifyCredentials) the code in the example could be used to use Basic Authentication.

    All the implementations of this method in the intrinsic MedicalConnections.Security classes do nothing.

    Example
    class MySecurity 
    { 
        class MySecurity : TlsClientWindows 
        { 
            public override void ModifyBindings(ModifyBindingsArgs args) 
            { 
                foreach (BindingElement b in args.Bindings) 
                { 
                    if (b is HttpsTransportBindingElement) 
                        (b as HttpsTransportBindingElement).AuthenticationScheme = System.Net.AuthenticationSchemes.Basic; 
                }
            } 
     
            public override void ModifyCredentials(ModifyCredentialArgs args) 
            { 
                args.Credentials.UserName.UserName = "MyUserName"; 
                args.Credentials.UserName.Password = "MyPassword"; 
            } 
        } 
    }
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also