//[MemberNotNull(nameof(_attributeTypeSymbol), nameof(_iNotifyChangedSymbol), nameof(_iNotifyChangingSymbol))] // Attribute not supported in netstandard 2.0 private CSharpCompilation EnsureSymbolsSet(CSharpCompilation cSharpCompilation) { var options = (cSharpCompilation.SyntaxTrees[0].Options as CSharpParseOptions) !; var compilation = Attributes.AddAttributesToSyntax(cSharpCompilation, options); // get the newly bound attribute, INotifyPropertyChanging and INotifyPropertyChanged _observableObjectAttributeSymbol ??= compilation.GetTypeByMetadataNameOrThrow(Attributes._fullObservableObjectAttributeName); _iNotifyChangedSymbol ??= compilation.GetTypeByMetadataNameOrThrow("System.ComponentModel.INotifyPropertyChanged"); _iNotifyChangingSymbol ??= compilation.GetTypeByMetadataNameOrThrow("System.ComponentModel.INotifyPropertyChanging"); return(compilation); }