@@ -179,7 +179,8 @@ private void GenerateOperationInterface(in GeneratorExecutionContext context, In
179179 identifier : SyntaxFactory . Identifier ( node . WrapperName ) ,
180180 parameterList : SyntaxFactory . ParameterList ( ) ,
181181 initializer : null ,
182- body : SyntaxFactory . Block ( staticCtorStatements ) ) ) ;
182+ body : SyntaxFactory . Block ( staticCtorStatements ) ,
183+ expressionBody : null ) ) ;
183184
184185 // private IArgumentOperationWrapper(IOperation operation)
185186 // {
@@ -203,7 +204,8 @@ private void GenerateOperationInterface(in GeneratorExecutionContext context, In
203204 SyntaxKind . SimpleMemberAccessExpression ,
204205 expression : SyntaxFactory . ThisExpression ( ) ,
205206 name : SyntaxFactory . IdentifierName ( "operation" ) ) ,
206- right : SyntaxFactory . IdentifierName ( "operation" ) ) ) ) ) ) ;
207+ right : SyntaxFactory . IdentifierName ( "operation" ) ) ) ) ,
208+ expressionBody : null ) ) ;
207209
208210 // public IOperation WrappedOperation => this.operation;
209211 members = members . Add ( SyntaxFactory . PropertyDeclaration (
@@ -679,7 +681,8 @@ private void GenerateOperationWrapperHelper(in GeneratorExecutionContext context
679681 identifier : SyntaxFactory . Identifier ( "OperationWrapperHelper" ) ,
680682 parameterList : SyntaxFactory . ParameterList ( ) ,
681683 initializer : null ,
682- body : SyntaxFactory . Block ( staticCtorStatements ) ) ;
684+ body : SyntaxFactory . Block ( staticCtorStatements ) ,
685+ expressionBody : null ) ;
683686
684687 // internal static Type GetWrappedType(Type wrapperType)
685688 // {
@@ -831,7 +834,7 @@ public DocumentData(XDocument document)
831834
832835 if ( ! operationKinds . TryGetValue ( node . Attribute ( "Name" ) . Value , out var kinds ) )
833836 {
834- kinds = ImmutableArray < ( string name , int value , string extraDescription ) > . Empty ;
837+ kinds = ImmutableArray < ( string name , int value , string ? extraDescription ) > . Empty ;
835838 }
836839
837840 var interfaceData = new InterfaceData ( this , node , kinds ) ;
@@ -847,7 +850,7 @@ public DocumentData(XDocument document)
847850
848851 if ( ! operationKinds . TryGetValue ( node . Attribute ( "Name" ) . Value , out var kinds ) )
849852 {
850- kinds = ImmutableArray < ( string name , int value , string extraDescription ) > . Empty ;
853+ kinds = ImmutableArray < ( string name , int value , string ? extraDescription ) > . Empty ;
851854 }
852855
853856 var interfaceData = new InterfaceData ( this , node , kinds ) ;
@@ -859,11 +862,11 @@ public DocumentData(XDocument document)
859862
860863 public ReadOnlyDictionary < string , InterfaceData > Interfaces { get ; }
861864
862- private static ImmutableDictionary < string , ImmutableArray < ( string name , int value , string extraDescription ) > > GetOperationKinds ( XDocument document )
865+ private static ImmutableDictionary < string , ImmutableArray < ( string name , int value , string ? extraDescription ) > > GetOperationKinds ( XDocument document )
863866 {
864867 var skippedOperationKinds = GetSkippedOperationKinds ( document ) ;
865868
866- var builder = ImmutableDictionary . CreateBuilder < string , ImmutableArray < ( string name , int value , string extraDescription ) > > ( ) ;
869+ var builder = ImmutableDictionary . CreateBuilder < string , ImmutableArray < ( string name , int value , string ? extraDescription ) > > ( ) ;
867870
868871 int operationKind = 0 ;
869872 foreach ( var node in document . XPathSelectElements ( "/Tree/AbstractNode|/Tree/Node" ) )
@@ -886,7 +889,7 @@ public DocumentData(XDocument document)
886889 }
887890 else if ( explicitKind . XPathSelectElements ( "Entry" ) . Any ( ) )
888891 {
889- var nodeBuilder = ImmutableArray . CreateBuilder < ( string name , int value , string extraDescription ) > ( ) ;
892+ var nodeBuilder = ImmutableArray . CreateBuilder < ( string name , int value , string ? extraDescription ) > ( ) ;
890893 foreach ( var entry in explicitKind . XPathSelectElements ( "Entry" ) )
891894 {
892895 if ( entry . Attribute ( "EditorBrowsable" ) ? . Value == "false" )
@@ -918,7 +921,7 @@ public DocumentData(XDocument document)
918921
919922 var nodeName = node . Attribute ( "Name" ) . Value ;
920923 var kindName = nodeName . Substring ( "I" . Length , nodeName . Length - "I" . Length - "Operation" . Length ) ;
921- builder . Add ( nodeName , ImmutableArray . Create ( ( kindName , operationKind , ( string ) null ) ) ) ;
924+ builder . Add ( nodeName , ImmutableArray . Create ( ( kindName , operationKind , ( string ? ) null ) ) ) ;
922925 }
923926
924927 return builder . ToImmutable ( ) ;
@@ -955,7 +958,7 @@ private sealed class InterfaceData
955958 {
956959 private readonly DocumentData documentData ;
957960
958- public InterfaceData ( DocumentData documentData , XElement node , ImmutableArray < ( string name , int value , string extraDescription ) > operationKinds )
961+ public InterfaceData ( DocumentData documentData , XElement node , ImmutableArray < ( string name , int value , string ? extraDescription ) > operationKinds )
959962 {
960963 this . documentData = documentData ;
961964
@@ -968,7 +971,7 @@ public InterfaceData(DocumentData documentData, XElement node, ImmutableArray<(s
968971 this . Properties = node . XPathSelectElements ( "Property" ) . Select ( property => new PropertyData ( property ) ) . ToImmutableArray ( ) ;
969972 }
970973
971- public ImmutableArray < ( string name , int value , string extraDescription ) > OperationKinds { get ; }
974+ public ImmutableArray < ( string name , int value , string ? extraDescription ) > OperationKinds { get ; }
972975
973976 public string InterfaceName { get ; }
974977
@@ -982,7 +985,7 @@ public InterfaceData(DocumentData documentData, XElement node, ImmutableArray<(s
982985
983986 public ImmutableArray < PropertyData > Properties { get ; }
984987
985- public InterfaceData BaseInterface
988+ public InterfaceData ? BaseInterface
986989 {
987990 get
988991 {
0 commit comments