File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Scripts/Services/Discovery/v1/Models Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 15
15
*
16
16
*/
17
17
using FullSerializer ;
18
+ using FullSerializer . Internal ;
18
19
using System ;
19
20
using System . Collections . Generic ;
20
21
@@ -75,12 +76,22 @@ public override bool CanProcess(Type type)
75
76
76
77
public override object CreateInstance ( fsData data , Type storageType )
77
78
{
78
- return base . CreateInstance ( data , storageType ) ;
79
+ return new EventData ( ) ;
79
80
}
80
81
81
82
public override fsResult TryDeserialize ( fsData data , ref object instance , Type storageType )
82
83
{
83
- throw new NotImplementedException ( ) ;
84
+ if ( data . IsString == false )
85
+ {
86
+ return fsResult . Fail ( "Type converter requires a string" ) ;
87
+ }
88
+
89
+ instance = fsTypeCache . GetType ( data . AsString ) ;
90
+ if ( instance == null )
91
+ {
92
+ return fsResult . Fail ( "Unable to find type " + data . AsString ) ;
93
+ }
94
+ return fsResult . Success ;
84
95
}
85
96
86
97
public override fsResult TrySerialize ( object instance , out fsData serialized , Type storageType )
You can’t perform that action at this time.
0 commit comments