コード例 #1
0
 private static void AssertTransientNotStored(WithTransient instance)
 {
     if (null != instance.TransientString)
     {
         throw new Exception("Transient was stored!");
     }
 }
コード例 #2
0
        private static void ReadWithTransientMarker()
        {
            IEmbeddedConfiguration configuration = Db4oEmbedded.NewConfiguration();

            configuration.Common.MarkTransient(typeof(TransientMarkerAttribute).FullName);
            IObjectContainer container = Db4oEmbedded.OpenFile(configuration, DatabaseFile);
            WithTransient    instance  = container.Query <WithTransient>()[0];

            AssertTransientNotStored(instance);

            container.Close();
        }
コード例 #3
0
 private static void AssertTransientNotStored(WithTransient instance)
 {
     if (null != instance.TransientString)
     {
         throw new Exception("Transient was stored!");
     }
 }