internal void Serialize(StringBlob symbols, StreamMarshaler streamBuffer) { CfgScriptRef cfgScriptRef = default(CfgScriptRef); cfgScriptRef._idRule = symbols.Find(_rule); cfgScriptRef._method = _method; cfgScriptRef._idMethod = _idSymbol; streamBuffer.WriteStream(cfgScriptRef); }
internal static ScriptRef[] LoadScriptRefs(StreamMarshaler streamHelper, CfgSerializedHeader pFH) { if (pFH.FormatId != _SPGDF_ContextFree) { return(null); } if (pFH.pszWords < Marshal.SizeOf(typeof(CfgSerializedHeader))) { return(null); } StringBlob stringBlob = LoadStringBlob(streamHelper, pFH.pszSymbols, pFH.cchSymbols); CfgScriptRef[] array = Load <CfgScriptRef>(streamHelper, pFH.pScripts, pFH.cScripts); ScriptRef[] array2 = new ScriptRef[array.Length]; for (int i = 0; i < array.Length; i++) { CfgScriptRef cfgScriptRef = array[i]; array2[i] = new ScriptRef(stringBlob[cfgScriptRef._idRule], stringBlob[cfgScriptRef._idMethod], cfgScriptRef._method); } return(array2); }