question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What is the point to declare internal abstract methods in the public abstract class that no-one will be able to use?

See original GitHub issue

We are continuously addressing and improving the SDK, if possible, make sure the problem persist in the latest SDK version.

Describe the bug We use Cosmos SDK v3.2 and want to upgrade to v3.4 but since new version introduces internal abstract method in public abstract class FeedIterator<T> there is no way to compile the code anymore. We do implement FeedIterator class in our Mock infrastructure for testing purposes but now the new version throws 'MockCosmosQuery<T>' does not implement inherited abstract member 'FeedIterator<T>.TryGetContinuationToken(out string)' error while if we try to implement missing method it will now complain that 'MockCosmosQuery<T>.TryGetContinuationToken(out string)': no suitable method found to override. Could you please make TryGetContinuationToken method public in the public abstract class?

To Reproduce Steps to reproduce the behavior. If you can include code snippets or links to repositories containing a repro of the issue that can helps us in detecting the scenario it would speed up the resolution.

Expected behavior Give some alternative how to implement FeedIterator<T> class

Actual behavior Unable to upgrade to v3.4 and have out test infrastructure working.

Environment summary SDK Version: 3.4. OS Version : Windows

Additional context Please think how your library may be used by external developers before marking methods internal.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hovsepmcommented, Nov 7, 2019

@j82w already referenced and confirming that it works. Thank for the fix!

1reaction
j82wcommented, Nov 6, 2019

The PR is out. I’ll try to get a hotfix out tomorrow. There is a work item to include public samples as part of the test projects to prevent this in the future.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - What is the purpose of internal abstract method in a ...
Adding internal member to a public abstract class makes it impossible to inherit that abstract class outside of assembly it was declared in....
Read more >
Abstract Classes and Abstract Methods in C# - ...
In this article, I am going to discuss Abstract Classes and Abstract Methods in C#. A class that is declared by using abstract...
Read more >
Abstract Methods and Classes (The Java™ Tutorials ...
Abstract classes cannot be instantiated, but they can be subclassed. An abstract method is a method that is declared without an implementation (without...
Read more >
C# | Abstract Classes
Abstract Method: A method that is declared abstract, has no “body” and is declared inside the abstract class only. An abstract method must...
Read more >
abstract - C# Reference
The abstract modifier can be used with classes, methods, properties, indexers, and events. Use the abstract modifier in a class declaration ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found