public static PersistentMethod Resolve(IMethod source, ITypeResolver typeResolver) { PersistentMethod met = new PersistentMethod (); met.FullyQualifiedName = source.FullyQualifiedName; met.Documentation = source.Documentation; met.modifiers = source.Modifiers; met.returnType = PersistentReturnType.Resolve (source.ReturnType, typeResolver); foreach (IParameter p in source.Parameters) met.parameters.Add (PersistentParameter.Resolve (p, typeResolver)); met.region = source.Region; return met; }
public static PersistentMethod Read(BinaryReader reader, INameDecoder nameTable) { PersistentMethod met = new PersistentMethod (); met.FullyQualifiedName = PersistentHelper.ReadString (reader, nameTable); met.Documentation = PersistentHelper.ReadString (reader, nameTable); met.modifiers = (ModifierEnum)reader.ReadUInt32(); met.returnType = PersistentReturnType.Read (reader, nameTable); uint count = reader.ReadUInt32(); for (uint i = 0; i < count; ++i) { met.parameters.Add (PersistentParameter.Read (reader, nameTable)); } met.region = PersistentRegion.Read (reader, nameTable); return met; }