File tree Expand file tree Collapse file tree
Scripts/Services/Assistant/v2/Models Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515*
1616*/
1717using FullSerializer ;
18+ using FullSerializer . Internal ;
1819using System ;
1920using System . Collections . Generic ;
2021using System . Runtime . Serialization ;
@@ -86,7 +87,22 @@ public override bool CanProcess(Type type)
8687
8788 public override fsResult TryDeserialize ( fsData data , ref object instance , Type storageType )
8889 {
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 ( ) ;
90106 }
91107
92108 public override fsResult TrySerialize ( object instance , out fsData serialized , Type storageType )
You can’t perform that action at this time.
0 commit comments