# HG changeset patch
# User wizard
# Date 1274826742 -14400
# Node ID 5edc2ac5231cf27655528cd92417c711c29e7708
# Parent  7084af955c5711937a75192e90064353260abf60
minor fix to the serialization mechanism

diff -r 7084af955c57 -r 5edc2ac5231c .settings/org.eclipse.core.resources.prefs
--- a/.settings/org.eclipse.core.resources.prefs	Tue May 25 01:26:42 2010 +0400
+++ b/.settings/org.eclipse.core.resources.prefs	Wed May 26 02:32:22 2010 +0400
@@ -1,3 +1,3 @@
-#Sat Mar 13 04:39:05 MSK 2010
+#Tue May 25 20:59:30 MSD 2010
 eclipse.preferences.version=1
 encoding/<project>=cp1251
diff -r 7084af955c57 -r 5edc2ac5231c Lib/IMPL/Serialization.pm
--- a/Lib/IMPL/Serialization.pm	Tue May 25 01:26:42 2010 +0400
+++ b/Lib/IMPL/Serialization.pm	Wed May 26 02:32:22 2010 +0400
@@ -178,13 +178,15 @@
   # ������� �������������������� �������.
   # SurogateHelper($Type)
   # $Type ��� �����, ��� ������� ����� �������.
-  private _direct property SurogateHelper => prop_all;
+  private _direct property SurrogateHelper => prop_all;
 }
 
 sub CTOR {
   my ($this,%args) = @_;
   $this->{$CurrentObject} = undef;
   $this->{$Root} = undef;
+  $this->{$ObjectFactory} = $args{ObjectFactory} if $args{ObjectFactory};
+  $this->{$SurrogateHelper} = $args{SurrogateHelper} if $args{SurrogateHelper};
 }
 
 sub OnObjectBegin {
@@ -223,7 +225,7 @@
 
 	if (defined $rhProps->{'id'}) {                          
     	die new IMPL::Exception("Trying to create a simple object instead of a reference, type is missing.",$name,$rhProps->{id}) unless $rhProps->{'type'} ;
-    	$this->{$Context}->{$rhProps->{'id'}} = $this->{$SurogateHelper} ? $this->{$SurogateHelper}->($rhProps->{'type'}) : DefaultSurogateHelper($rhProps->{'type'});
+    	$this->{$Context}->{$rhProps->{'id'}} = $this->{$SurrogateHelper} ? $this->{$SurrogateHelper}->($rhProps->{'type'}) : DefaultSurrogateHelper($rhProps->{'type'});
 	}
   }
   
@@ -300,7 +302,7 @@
   scalar keys %{"$_[0]::"} ? 1 : 0;
 }
 
-sub DefaultSurogateHelper {
+sub DefaultSurrogateHelper {
   my ($Type) = @_;
   
   if ($Type eq 'SCALAR' or $Type eq 'REF') {