Пример #1
0
        static void Main(string[] args)
        {
            try
            {
                Document.Document doc   = new Document.Document();
                Document.Document spDoc = new SpecialDocument();

                doc.Store();
                spDoc.Store();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            Console.ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            try
            {
                Document.Document doc = new Document.Document();
                Document.Document spDoc = new SpecialDocument();

                doc.Store();
                spDoc.Store();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            Console.ReadLine();
        }
 public void Store(Document.Document doc)
 {
     Console.WriteLine("SpecialDocumentPersistentStorage store {0}", doc.ID);
 }
 public static void Store(this Document.Document doc)
 {
     GetPersistentItemFor(doc.GetType()).Store(doc);
 }