Skip to content

Commit 6443c78

Browse files
authored
Merge pull request #346 from southernsun/patch-1
Update Sample08_Polymorphism.cs
2 parents 6a455ed + bec12b0 commit 6443c78

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

samples/Samples/Sample08_Polymorphism.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@ public void Polymorphism()
5656
using ( var buffer = new MemoryStream() )
5757
{
5858
serializer.Pack(
59-
buffer, new PolymorphicHolder
60-
{
61-
WithRuntimeType = new FileObject { Path = "/path/to/file" },
62-
WithKnownType = new DirectoryObject { Path = "/path/to/dir/" }
63-
}
59+
buffer, rootObject
6460
);
6561

6662
buffer.Position = 0;
@@ -200,4 +196,4 @@ public static bool Verify( PolymorphicTypeVerificationContext context )
200196
return true;
201197
}
202198
}
203-
}
199+
}

0 commit comments

Comments
 (0)