01/* Copyright (C) 2004 - 2007 db4objects Inc. http://www.db4o.com */ 02
namespace Db4objects.Db4odoc.SelectivePersistence 03
{ 04
class Test2 05
{ 06
private Test1 test1; 07
private string name; 08
private NotStorable transientClass; 09
10
11
public Test2(string name, NotStorable transientClass, Test1 test1) 12
{ 13
this.test1 = test1; 14
this.name = name; 15
this.transientClass = transientClass; 16
} 17
18
public override string ToString() 19
{ 20
if (transientClass == null) 21
{ 22
return string.Format("{0}/{1}; test1: {2}", name, "null", test1); 23
} 24
else 25
{ 26
return string.Format("{0}/{1}; test1: {2}", name, transientClass, test1); 27
} 28
} 29
} 30
}
01' Copyright (C) 2004 - 2007 db4objects Inc. http://www.db4o.com 02
03
Namespace Db4objects.Db4odoc.SelectivePersistence 04
Class Test2 05
Private test1 As Test1 06
Private name As String 07
Private transientClass As NotStorable 08
09
Public Sub New(ByVal name As String, ByVal transientClass As NotStorable, ByVal test1 As Test1) 10
Me.test1 = test1 11
Me.name = name 12
Me.transientClass = transientClass 13
End Sub 14
15
Public Overloads Overrides Function ToString() As String 16
If transientClass Is Nothing Then 17
Return String.Format("{0}/{1}; test1: {2}", name, "Nothing", test1.ToString()) 18
Else 19
Return String.Format("{0}/{1}; test1: {2}", name, transientClass.ToString(), test1.ToString()) 20
End If 21
End Function 22
End Class 23
End Namespace