public new static CustomMarshalDescriptor FromReader(IBinaryStreamReader reader) { var descriptor = new CustomMarshalDescriptor(); Guid guid; Guid.TryParse(reader.ReadSerString(), out guid); descriptor.Guid = guid; descriptor.UnmanagedType = reader.ReadSerString(); descriptor.ManagedType = reader.ReadSerString(); descriptor.Cookie = reader.ReadSerString(); return(descriptor); }
public static new CustomMarshalDescriptor FromReader(IBinaryStreamReader reader) { var descriptor = new CustomMarshalDescriptor() { StartOffset = reader.Position }; Guid guid; Guid.TryParse(reader.ReadSerString(), out guid); descriptor.Guid = guid; descriptor.UnmanagedType = reader.ReadSerString(); descriptor.ManagedType = reader.ReadSerString(); descriptor.Cookie = reader.ReadSerString(); return descriptor; }