Пример #1
0
        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);
        }
Пример #2
0
        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;
        }