logo

Crowdly

Browser

Add to Chrome

public class TimeoutDecorator : ICommand { private readonly ICommand _inner...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

public class TimeoutDecorator : ICommand

{

private readonly ICommand _inner;

private readonly int _ms;

public TimeoutDecorator(ICommand c, int ms) => (_inner, _ms) = (c, ms);

public bool Execute()

{

var t = new Thread(_inner.Execute);

t.Start();

return t.Join(_ms);

}

}

Чому Decorator з тайм‑аутом корисний?

100%
0%
0%
0%
More questions like this

Want instant access to all verified answers on do.ipo.kpi.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome