File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
dotnet/src/dotnetframework/GxClasses/Helpers Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -692,20 +692,26 @@ internal static string JsonQuote(string value, bool addDoubleQuotes=false)
692692#if ! NETCORE
693693 public static void SetSoapContext ( GXSOAPContext value )
694694 {
695- RequestMessageExtension ext = OperationContext . Current . Extensions . Find < RequestMessageExtension > ( ) ;
696- if ( ext == null )
695+ if ( OperationContext . Current != null )
697696 {
698- ext = new RequestMessageExtension ( ) ;
699- OperationContext . Current . Extensions . Add ( ext ) ;
697+ RequestMessageExtension ext = OperationContext . Current . Extensions . Find < RequestMessageExtension > ( ) ;
698+ if ( ext == null )
699+ {
700+ ext = new RequestMessageExtension ( ) ;
701+ OperationContext . Current . Extensions . Add ( ext ) ;
702+ }
703+ ext . SOAPContext = value ;
700704 }
701- ext . SOAPContext = value ;
702705 }
703706 internal static GXSOAPContext GetSoapContext ( )
704707 {
705- RequestMessageExtension ext = OperationContext . Current . Extensions . Find < RequestMessageExtension > ( ) ;
706- if ( ext != null )
708+ if ( OperationContext . Current != null )
707709 {
708- return ext . SOAPContext ;
710+ RequestMessageExtension ext = OperationContext . Current . Extensions . Find < RequestMessageExtension > ( ) ;
711+ if ( ext != null )
712+ {
713+ return ext . SOAPContext ;
714+ }
709715 }
710716 return null ;
711717 }
You can’t perform that action at this time.
0 commit comments