File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Scripts/Services/Assistant/v2/Models Expand file tree Collapse file tree 1 file changed +17
-1
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
using System . Runtime . Serialization ;
@@ -86,7 +87,22 @@ public override bool CanProcess(Type type)
86
87
87
88
public override fsResult TryDeserialize ( fsData data , ref object instance , Type storageType )
88
89
{
89
- throw new NotImplementedException ( ) ;
90
+ if ( data . IsString == false )
91
+ {
92
+ return fsResult . Fail ( "Type converter requires a string" ) ;
93
+ }
94
+
95
+ instance = fsTypeCache . GetType ( data . AsString ) ;
96
+ if ( instance == null )
97
+ {
98
+ return fsResult . Fail ( "Unable to find type " + data . AsString ) ;
99
+ }
100
+ return fsResult . Success ;
101
+ }
102
+
103
+ public override object CreateInstance ( fsData data , Type storageType )
104
+ {
105
+ return new MessageInput ( ) ;
90
106
}
91
107
92
108
public override fsResult TrySerialize ( object instance , out fsData serialized , Type storageType )
You can’t perform that action at this time.
0 commit comments