Вход на сайт
редактирование - merge()... в синглетоне
408 просмотров
Перейти к просмотру всей ветки
в ответ Murr 22.11.12 14:13
Я так понимаю, что у тебя там несколько разных типом документов...
т.е.
class Document
{
}
class Document_A : Document
{
}
class Document_B : Document
{
}
итд.
может быть тебе тогда сделать мультидокументный синглтон? :)
class Document
{
private static Dictionary <Type, Document> _docs = new Dictionary <Type, Document> ();
private static Document GetDocumentByType (Type type)
{
}
дальше сам :)
}
т.е.
class Document
{
}
class Document_A : Document
{
}
class Document_B : Document
{
}
итд.
может быть тебе тогда сделать мультидокументный синглтон? :)
class Document
{
private static Dictionary <Type, Document> _docs = new Dictionary <Type, Document> ();
private static Document GetDocumentByType (Type type)
{
}
дальше сам :)
}