logo

Crowdly

Browser

Add to Chrome

Основи розробки програмного забезпечення на платформі Microsoft.NET

Looking for Основи розробки програмного забезпечення на платформі Microsoft.NET test answers and solutions? Browse our comprehensive collection of verified answers for Основи розробки програмного забезпечення на платформі Microsoft.NET at do.ipo.kpi.ua.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Згідно принципу єдиного обов'язку

0%
100%
0%
View this question

string js = $"{{\"n\":{decimal.MaxValue} }}";

decimal d = JsonDocument.Parse(js).RootElement.GetProperty("n").GetDecimal();

System.Console.WriteLine(d == decimal.MaxValue);

0%
0%
0%
0%
View this question

foreach(var e in list){ list.Add(e); }

Чому кинеться InvalidOperationException?

0%
0%
0%
100%
View this question

public event Action

? Message;

Чому event-модель не завжди заміняє Mediator?

0%
0%
0%
100%
View this question

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%
View this question
Чому DI зазвичай не поєднується з патерном Singleton?
0%
0%
0%
0%
View this question

Prod p = new Car { Wheels = 4 };

var opt = new JsonSerializerOptions { TypeInfoResolver = new DefaultJsonTypeInfoResolver() };

string js = JsonSerializer.Serialize<Prod>(p, opt);

System.Console.WriteLine(js.Contains("Car"));

[JsonPolymorphic] [JsonDerivedType(typeof(Car))] abstract class Prod { }

class Car : Prod { public int Wheels { get; set; } }

0%
0%
0%
100%
View this question

Патерн Visitor використовується тоді, коли

100%
100%
100%
0%
View this question

public class MoveCommand : ICommand

{

private readonly Actor _a; private readonly Vector2 _d;

public MoveCommand(Actor a, Vector2 d)=>(_a,_d)=(a,d);

public void Execute() => _a.MoveBy(_d);

public void Undo() => _a.MoveBy(-_d);

}

Чому Undo має доступ до того ж Actor і Vector2?

0%
0%
100%
0%
View this question

public class TimingDecorator : IJob

{

private readonly IJob _inner;

private readonly IMetrics _m;

public TimingDecorator(IJob j, IMetrics m) => (_inner, _m) = (j, m);

public void Run()

{

var sw = Stopwatch.StartNew();

_inner.Run();

_m.Record("job_ms", sw.ElapsedMilliseconds);

}

}

Що додає TimingDecorator?

0%
0%
0%
0%
View this question

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