@@ -1143,18 +1143,32 @@ private static void AddTransportSecurityBindingElement(CodeStatementCollection s
11431143 "issuerAddress" ,
11441144 new CodeObjectCreateExpression ( typeof ( EndpointAddress ) ,
11451145 new CodeObjectCreateExpression ( typeof ( Uri ) ,
1146- new CodePrimitiveExpression ( issuedTokenOverTransportParameters . IssuerAddress . Uri . ToString ( ) ) ) ) ) ) ;
1146+ new CodePrimitiveExpression ( issuedTokenOverTransportParameters . IssuerAddress . ToString ( ) ) ) ) ) ) ;
11471147
1148- defaultBindingElementFactoryMethodExpressionParameters = new CodeExpression [ ]
1149- {
1148+ statements . Add ( new CodeVariableDeclarationStatement (
1149+ typeof ( System . ServiceModel . Security . Tokens . IssuedSecurityTokenParameters ) ,
1150+ "issuedTokenParameters" ,
11501151 new CodeObjectCreateExpression (
11511152 typeof ( System . ServiceModel . Security . Tokens . IssuedSecurityTokenParameters ) ,
11521153 new CodeExpression [ ]
11531154 {
11541155 new CodePrimitiveExpression ( issuedTokenOverTransportParameters . TokenType ) ,
11551156 new CodeVariableReferenceExpression ( "issuerAddress" ) ,
11561157 new CodeVariableReferenceExpression ( "issuerBinding" )
1157- } )
1158+ } ) ) ) ;
1159+
1160+ statements . Add ( new CodeAssignStatement (
1161+ new CodePropertyReferenceExpression ( new CodeVariableReferenceExpression ( "issuedTokenParameters" ) , "KeySize" ) ,
1162+ new CodePrimitiveExpression ( issuedTokenOverTransportParameters . KeySize ) ) ) ;
1163+
1164+ statements . Add ( new CodeAssignStatement (
1165+ new CodePropertyReferenceExpression ( new CodeVariableReferenceExpression ( "issuedTokenParameters" ) , "UseStrTransform" ) ,
1166+ new CodePrimitiveExpression ( issuedTokenOverTransportParameters . UseStrTransform ) ) ) ;
1167+
1168+
1169+ defaultBindingElementFactoryMethodExpressionParameters = new CodeExpression [ ]
1170+ {
1171+ new CodeVariableReferenceExpression ( "issuedTokenParameters" )
11581172 } ;
11591173 }
11601174
0 commit comments