Login
редактирование - merge()... в синглетоне
408 просмотров
Перейти к просмотру всей ветки
Posmotrim посетитель
in Antwort Murr 22.11.12 14:09
ну так отдели мух от котлет:
interface IDocument
{
//свойства и методы, которые макаке можно вызывать
}
interface IPersistent
{
void Write(Stream s);
void Read(Stream s);
}
class Application
{
private Application() {throw new NotImplementedException();}
static Application Instance {get {throw new NotImplementedException();}}
public IDocument ActiveDocument { get { return doc; } }
public void OpenDocument(Stream from)
{
doc = new Document(from);
}
private Document doc;
}
class Document : IDocument, IPersistent
{
//...
}