Проблем с имплементиране на интерфейс
Здравейте! Решавам задачата от C# OOP Exam - 15 Dec 2019. Някой да се е сблъсквал с подобен проблем и да е намерил решениието му? При опит да имплементирам интерфейс ми излиза следния error:
System.NullReferenceException : Object reference not set to an instance of an object.
at Microsoft.CodeAnalysis.CSharp.Extensions.ITypeSymbolExtensions.GenerateTypeSyntax(INamespaceOrTypeSymbol symbol,Boolean nameSyntax,Boolean allowVar)
at Microsoft.CodeAnalysis.CSharp.CodeGeneration.CSharpSyntaxGenerator.TypeExpression(ITypeSymbol typeSymbol)
at Microsoft.CodeAnalysis.Editing.SyntaxGenerator.TypeExpression(ITypeSymbol typeSymbol,Boolean addImport)
at Microsoft.CodeAnalysis.Shared.Extensions.ICodeDefinitionFactoryExtensions.CreateThrowNotImplementedStatement(SyntaxGenerator codeDefinitionFactory,Compilation compilation)
at Microsoft.CodeAnalysis.ImplementInterface.AbstractImplementInterfaceService.ImplementInterfaceCodeAction.GetGetAccessorStatements(Compilation compilation,IPropertySymbol property,Boolean generateAbstractly,ImplementTypePropertyGenerationBehavior propertyGenerationBehavior,CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.ImplementInterface.AbstractImplementInterfaceService.ImplementInterfaceCodeAction.GenerateGetAccessor(Compilation compilation,IPropertySymbol property,Accessibility accessibility,Boolean generateAbstractly,Boolean useExplicitInterfaceSymbol,ImplementTypePropertyGenerationBehavior propertyGenerationBehavior,INamedTypeSymbol[] attributesToRemove,CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.ImplementInterface.AbstractImplementInterfaceService.ImplementInterfaceCodeAction.GenerateProperty(Compilation compilation,IPropertySymbol property,Accessibility accessibility,DeclarationModifiers modifiers,Boolean generateAbstractly,Boolean useExplicitInterfaceSymbol,String memberName,ImplementTypePropertyGenerationBehavior propertyGenerationBehavior,CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.ImplementInterface.AbstractImplementInterfaceService.ImplementInterfaceCodeAction.GenerateMember(Compilation compilation,ISymbol member,String memberName,Boolean generateInvisibly,Boolean generateAbstractly,Boolean addNew,Boolean addUnsafe,ImplementTypePropertyGenerationBehavior propertyGenerationBehavior,CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.ImplementInterface.AbstractImplementInterfaceService.ImplementInterfaceCodeAction.GenerateMember(Compilation compilation,ISymbol member,List`1 implementedVisibleMembers,ImplementTypePropertyGenerationBehavior propertyGenerationBehavior,CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.ImplementInterface.AbstractImplementInterfaceService.ImplementInterfaceCodeAction.GenerateMembers(Compilation compilation,ImmutableArray`1 unimplementedMembers,ImplementTypePropertyGenerationBehavior propertyGenerationBehavior,CancellationToken cancellationToken)
at async Microsoft.CodeAnalysis.ImplementInterface.AbstractImplementInterfaceService.ImplementInterfaceCodeAction.GetUpdatedDocumentAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetChangedSolutionAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.ComputeOperationsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetPreviewOperationsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.GetPreviewResultAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.<>c__DisplayClass11_0.<GetPreviewAsync>b__0(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsync[T](<Unknown Parameters>)
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)