jeudi 2 juin 2016

How do I implement a Decorator class of abstract class with no default constructor?

I am trying to make an decorator class, but I am getting an error "There is no argument given that corresponds to the required formal parameter 'conversation'of Call.Call(Conversation)

Normally you would instantiate a Conversation object and then instantiate a new Call object with reference to that Conversation

example: Call _call = new Call(_conversation);

public abstract class CallDecorator : Call
{
    public CallDecorator(Call aCall)
    {

    }

The error is on the decorator.

Context: The Conversation and the Call objects are part of the Microsoft.rtc.collaboration SDK for Lync. The conversation has no parameterless constructor, but should be instantiated with new Conversation(_endpoint)

Maybe some other pattern would apply

Aucun commentaire:

Enregistrer un commentaire