{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/comments/49541167","id":49541167,"diff_hunk":"@@ -0,0 +1,1125 @@\n+﻿// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.\n+\n+#pragma warning disable RS0008 // Implement IEquatable<T> when overriding Object.Equals\n+\n+using System;\n+using System.Collections.Immutable;\n+using System.ComponentModel;\n+using System.Reflection.Metadata;\n+\n+#if !SRM\n+using PrimitiveTypeCode = Microsoft.Cci.PrimitiveTypeCode;\n+#endif\n+\n+#if SRM\n+namespace System.Reflection.Metadata.Ecma335.Blobs\n+#else\n+namespace Roslyn.Reflection.Metadata.Ecma335.Blobs\n+#endif\n+{\n+    // TODO: arg validation\n+    // TODO: can we hide useless inherited methods?\n+    // TODO: MethodBody\n+    // TODO: debug metadata blobs\n+    // TODO: MethodBodyTokenRewriter\n+    // TODO: Skip- for each Add- method of all enumerators that count elements (see local vars)\n+\n+    //[EditorBrowsable(EditorBrowsableState.Never)]\n+    //public override bool Equals(object obj) => base.Equals(obj);\n+    //[EditorBrowsable(EditorBrowsableState.Never)]\n+    //public override int GetHashCode() => base.GetHashCode();\n+    //[EditorBrowsable(EditorBrowsableState.Never)]\n+    //public override string ToString() => base.ToString();\n+\n+#if SRM\n+    public\n+#endif\n+    interface IBlobEncoder\n+    {\n+        BlobBuilder Builder { get; }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct BlobEncoder : IBlobEncoder\n+    {\n+        public BlobBuilder Builder { get; }\n+\n+        public BlobEncoder(BlobBuilder builder)\n+        {\n+            Builder = builder;\n+        }\n+\n+        public CustomModifiersEncoder<SignatureTypeEncoder<BlobEncoder>> FieldSignature()\n+        {\n+            Builder.WriteByte((byte)SignatureKind.Field);\n+            return new CustomModifiersEncoder<SignatureTypeEncoder<BlobEncoder>>(\n+                new SignatureTypeEncoder<BlobEncoder>(this));\n+        }\n+\n+        public GenericTypeArgumentsEncoder<BlobEncoder> MethodSpecificationSignature(int genericArgumentCount)\n+        {\n+            // TODO: arg validation\n+\n+            Builder.WriteByte((byte)SignatureKind.MethodSpecification);\n+            Builder.WriteCompressedInteger((uint)genericArgumentCount);\n+\n+            return new GenericTypeArgumentsEncoder<BlobEncoder>(this, genericArgumentCount);\n+        }\n+\n+        public MethodSignatureEncoder<BlobEncoder> MethodSignature(SignatureCallingConvention convention, int genericParameterCount, bool isInstanceMethod)\n+        {\n+            // TODO: arg validation\n+\n+            var attributes = \n+                (genericParameterCount != 0 ? SignatureAttributes.Generic : 0) | \n+                (isInstanceMethod ? SignatureAttributes.Instance : 0);\n+\n+            Builder.WriteByte(SignatureHeader(SignatureKind.Method, convention, attributes).RawValue);\n+\n+            if (genericParameterCount != 0)\n+            {\n+                Builder.WriteCompressedInteger((uint)genericParameterCount);\n+            }\n+\n+            return new MethodSignatureEncoder<BlobEncoder>(this, isVarArg: convention == SignatureCallingConvention.VarArgs);\n+        }\n+\n+        public MethodSignatureEncoder<BlobEncoder> PropertySignature(bool isInstanceProperty)\n+        {\n+            Builder.WriteByte(SignatureHeader(SignatureKind.Property, SignatureCallingConvention.Default, (isInstanceProperty ? SignatureAttributes.Instance : 0)).RawValue);\n+            return new MethodSignatureEncoder<BlobEncoder>(this, isVarArg: false);\n+        }\n+\n+        public FixedArgumentsEncoder<NamedArgumentsEncoder<BlobEncoder>> CustomAttributeSignature(int namedArgumentCount)\n+        {\n+            if (unchecked((ushort)namedArgumentCount) > ushort.MaxValue)\n+            {\n+                throw new ArgumentOutOfRangeException(nameof(namedArgumentCount));\n+            }\n+\n+            Builder.WriteUInt16(0x0001);\n+\n+            return new FixedArgumentsEncoder<NamedArgumentsEncoder<BlobEncoder>>(\n+                new NamedArgumentsEncoder<BlobEncoder>(this, (ushort)namedArgumentCount, writeCount: true));\n+        }\n+\n+        public LocalVariablesEncoder<BlobEncoder> LocalVariableSignature(int count)\n+        {\n+            Builder.WriteByte((byte)SignatureKind.LocalVariables);\n+            Builder.WriteCompressedInteger((uint)count);\n+            return new LocalVariablesEncoder<BlobEncoder>(this, count);\n+        }\n+\n+        // TODO: TypeSpec is limited to structured types (doesn't have primitive types, TypeDefRefSpec)\n+        public SignatureTypeEncoder<BlobEncoder> TypeSpecificationSignature()\n+        {\n+            return new SignatureTypeEncoder<BlobEncoder>(this);\n+        }\n+\n+        public PermissionSetEncoder<BlobEncoder> PermissionSetBlob(int attributeCount)\n+        {\n+            Builder.WriteByte((byte)'.');\n+            Builder.WriteCompressedInteger((uint)attributeCount);\n+\n+            return new PermissionSetEncoder<BlobEncoder>(this, attributeCount);\n+        }\n+\n+        public NamedArgumentsEncoder<BlobEncoder> PermissionSetArguments(int argumentCount)\n+        {\n+            if (unchecked((ushort)argumentCount) > ushort.MaxValue)\n+            {\n+                throw new ArgumentOutOfRangeException(nameof(argumentCount));\n+            }\n+\n+            Builder.WriteCompressedInteger((uint)argumentCount);\n+            return new NamedArgumentsEncoder<BlobEncoder>(this, (ushort)argumentCount, writeCount: false);\n+        }\n+\n+        // TOOD: add ctor to SignatureHeader\n+        internal static SignatureHeader SignatureHeader(SignatureKind kind, SignatureCallingConvention convention, SignatureAttributes attributes)\n+        {\n+            return new SignatureHeader((byte)((int)kind | (int)convention | (int)attributes));\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct MethodSignatureEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+        private readonly bool _isVarArg;\n+\n+        internal MethodSignatureEncoder(T continuation, bool isVarArg)\n+        {\n+            _continuation = continuation;\n+            _isVarArg = isVarArg;\n+        }\n+\n+        public CustomModifiersEncoder<ReturnTypeEncoder<ParametersEncoder<T>>> Parameters(int parameterCount)\n+        {\n+            Builder.WriteCompressedInteger((uint)parameterCount);\n+\n+            return new CustomModifiersEncoder<ReturnTypeEncoder<ParametersEncoder<T>>>(\n+                new ReturnTypeEncoder<ParametersEncoder<T>>(\n+                    new ParametersEncoder<T>(_continuation, parameterCount, allowOptional: _isVarArg)));\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct LocalVariablesEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+        private readonly int _count;\n+\n+        public LocalVariablesEncoder(T continuation, int count)\n+        {\n+            if (count < 0)\n+            {\n+                throw new InvalidOperationException();\n+            }\n+\n+            _count = count;\n+            _continuation = continuation;\n+        }\n+\n+        public LocalVariableEncoder<LocalVariablesEncoder<T>> AddVariable()\n+        {\n+            return new LocalVariableEncoder<LocalVariablesEncoder<T>>(\n+                new LocalVariablesEncoder<T>(_continuation, _count - 1));\n+        }\n+\n+        /// <summary>\n+        /// The variable blob is written directly to the underlying <see cref=\"Builder\"/>.\n+        /// </summary>\n+        public LocalVariablesEncoder<T> SkipVariable()\n+        {\n+            return new LocalVariablesEncoder<T>(_continuation, _count - 1);\n+        }\n+\n+        public T EndVariables()\n+        {\n+            if (_count > 0)\n+            {\n+                throw new InvalidOperationException();\n+            }\n+\n+            return _continuation;\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct LocalVariableEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+\n+        public LocalVariableEncoder(T continuation)\n+        {\n+            _continuation = continuation;\n+        }\n+\n+        public CustomModifiersEncoder<LocalVariableTypeEncoder<T>> ModifiedType()\n+        {\n+            return new CustomModifiersEncoder<LocalVariableTypeEncoder<T>>(\n+                new LocalVariableTypeEncoder<T>(_continuation));\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct LocalVariableTypeEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+\n+        public LocalVariableTypeEncoder(T continuation)\n+        {\n+            _continuation = continuation;\n+        }\n+\n+        public SignatureTypeEncoder<T> Type(bool isPinned, bool isByRef)\n+        {\n+            if (isPinned)\n+            {\n+                Builder.WriteByte((byte)SignatureTypeCode.Pinned);\n+            }\n+\n+            if (isByRef)\n+            {\n+                Builder.WriteByte((byte)SignatureTypeCode.ByReference);\n+            }\n+\n+            return new SignatureTypeEncoder<T>(_continuation);\n+        }\n+\n+        public T TypedReference()\n+        {\n+            Builder.WriteByte((byte)SignatureTypeCode.TypedReference);\n+            return _continuation;\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct ParameterTypeEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+\n+        public ParameterTypeEncoder(T continuation)\n+        {\n+            _continuation = continuation;\n+        }\n+\n+        public SignatureTypeEncoder<T> Type(bool isByRef)\n+        {\n+            if (isByRef)\n+            {\n+                Builder.WriteByte((byte)SignatureTypeCode.ByReference);\n+            }\n+\n+            return new SignatureTypeEncoder<T>(_continuation);\n+        }\n+\n+        /// <summary>\n+        /// ECMA-335 specification only allows custom modifiers preceding BYREF marker, \n+        /// however the C++ compiler emits signatures with modifiers following BYREF as well.\n+        /// Use this method only when such signatures need to be supported.\n+        /// </summary>\n+        [Obsolete(\"Not compliant with ECMA-335 specification\", error: false)]\n+        [EditorBrowsable(EditorBrowsableState.Never)]\n+        public CustomModifiersEncoder<SignatureTypeEncoder<T>> ModifiedType(bool isByRef)\n+        {\n+            if (isByRef)\n+            {\n+                Builder.WriteByte((byte)SignatureTypeCode.ByReference);\n+            }\n+\n+            return new CustomModifiersEncoder<SignatureTypeEncoder<T>>(new SignatureTypeEncoder<T>(_continuation));\n+        }\n+\n+        public T TypedReference()\n+        {\n+            Builder.WriteByte((byte)SignatureTypeCode.TypedReference);\n+            return _continuation;\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct PermissionSetEncoder<T>\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+        private readonly int _count;\n+\n+        public PermissionSetEncoder(T continuation, int count)\n+        {\n+            if (count < 0)\n+            {\n+                throw new InvalidOperationException();\n+            }\n+\n+            _count = count;\n+            _continuation = continuation;\n+        }\n+\n+        public PermissionSetEncoder<T> AddPermission(string typeName, BlobBuilder arguments)\n+        {\n+            Builder.WriteSerializedString(typeName);\n+            //return new NamedArgumentsBuilder<T>(_continuation, propertyCount, CountFormat.Compressed);\n+            Builder.WriteCompressedInteger((uint)arguments.Count);\n+            arguments.WriteContentTo(Builder);\n+            return new PermissionSetEncoder<T>(_continuation, _count - 1);\n+        }\n+\n+        public T End()\n+        {\n+            if (_count > 0)\n+            {\n+                throw new InvalidOperationException();\n+            }\n+\n+            return _continuation;\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct GenericTypeArgumentsEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+        private readonly int _count;\n+\n+        internal GenericTypeArgumentsEncoder(T continuation, int count)\n+        {\n+            if (count < 0)\n+            {\n+                throw new InvalidOperationException();\n+            }\n+\n+            _continuation = continuation;\n+            _count = count;\n+        }\n+\n+        public CustomModifiersEncoder<SignatureTypeEncoder<GenericTypeArgumentsEncoder<T>>> AddArgument()\n+        {\n+            return new CustomModifiersEncoder<SignatureTypeEncoder<GenericTypeArgumentsEncoder<T>>>(\n+                new SignatureTypeEncoder<GenericTypeArgumentsEncoder<T>>(\n+                    new GenericTypeArgumentsEncoder<T>(_continuation, _count - 1)));\n+        }\n+\n+        public T EndArguments()\n+        {\n+            if (_count > 0)\n+            {\n+                throw new InvalidOperationException();\n+            }\n+\n+            return _continuation;\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct FixedArgumentsEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+\n+        internal FixedArgumentsEncoder(T continuation)\n+        {\n+            _continuation = continuation;\n+        }\n+\n+        public LiteralEncoder<FixedArgumentsEncoder<T>> AddArgument()\n+        {\n+            return new LiteralEncoder<FixedArgumentsEncoder<T>>(this);\n+        }\n+\n+        public T EndArguments()\n+        {\n+            return _continuation;\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct LiteralEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+\n+        internal LiteralEncoder(T continuation)\n+        {\n+            _continuation = continuation;\n+        }\n+\n+        public VectorEncoder<T> Vector()\n+        {\n+            return new VectorEncoder<T>(_continuation);\n+        }\n+\n+        public CustomAttributeArrayTypeEncoder<VectorEncoder<T>> TaggedVector()\n+        {\n+            return new CustomAttributeArrayTypeEncoder<VectorEncoder<T>>(\n+                new VectorEncoder<T>(_continuation));\n+        }\n+\n+        public ScalarEncoder<T> Scalar()\n+        {\n+            return new ScalarEncoder<T>(_continuation);\n+        }\n+\n+        public CustomAttributeElementTypeEncoder<ScalarEncoder<T>> TaggedScalar()\n+        {\n+            return new CustomAttributeElementTypeEncoder<ScalarEncoder<T>>(\n+                new ScalarEncoder<T>(_continuation));\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct ScalarEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+\n+        internal ScalarEncoder(T continuation)\n+        {\n+            _continuation = continuation;\n+        }\n+\n+        public T NullArray()\n+        {\n+            Builder.WriteInt32(-1);\n+            return _continuation;\n+        }\n+\n+        public T Constant(object value)\n+        {\n+            string str = value as string;\n+            if (str != null || value == null)\n+            {\n+                String(str);\n+            }\n+            else\n+            {\n+                Builder.WriteConstant(value);\n+            }\n+\n+            return _continuation;\n+        }\n+\n+        public T SystemType(string serializedTypeName)\n+        {\n+            String(serializedTypeName);\n+            return _continuation;\n+        }\n+\n+        private T String(string value)\n+        {\n+            Builder.WriteSerializedString(value);\n+            return _continuation;\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct LiteralsEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+        private readonly int _count;\n+\n+        internal LiteralsEncoder(T continuation, int count)\n+        {\n+            if (count < 0)\n+            {\n+                throw new InvalidOperationException();\n+            }\n+\n+            _continuation = continuation;\n+            _count = count;\n+        }\n+\n+        public LiteralEncoder<LiteralsEncoder<T>> AddLiteral()\n+        {\n+            return new LiteralEncoder<LiteralsEncoder<T>>(new LiteralsEncoder<T>(_continuation, _count - 1));\n+        }\n+\n+        public T EndLiterals()\n+        {\n+            if (_count > 0)\n+            {\n+                throw new InvalidOperationException();\n+            }\n+\n+            return _continuation;\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct VectorEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+\n+        private readonly T _continuation;\n+\n+        internal VectorEncoder(T continuation)\n+        {\n+            _continuation = continuation;\n+        }\n+\n+        public LiteralsEncoder<T> Count(int count)\n+        {\n+            Builder.WriteUInt32((uint)count);\n+            return new LiteralsEncoder<T>(_continuation, count);\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct NameEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+\n+        public NameEncoder(T continuation)\n+        {\n+            _continuation = continuation;\n+        }\n+\n+        public T Name(string name)\n+        {\n+            Builder.WriteSerializedString(name);\n+            return _continuation;\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct NamedArgumentsEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+\n+        private readonly T _continuation;\n+        private readonly ushort _count;\n+        private readonly bool _writeCount;\n+\n+        internal NamedArgumentsEncoder(T continuation, ushort count, bool writeCount)\n+        {\n+            _continuation = continuation;\n+            _count = count;\n+            _writeCount = writeCount;\n+        }\n+\n+        public NamedArgumentTypeEncoder<NameEncoder<LiteralEncoder<NamedArgumentsEncoder<T>>>> AddArgument(bool isField)\n+        {\n+            if (_count == 0)\n+            {\n+                throw new InvalidOperationException();\n+            }\n+\n+            if (_writeCount)\n+            {\n+                Builder.WriteUInt16(_count);\n+            }\n+\n+            Builder.WriteByte(isField ? (byte)0x53 : (byte)0x54);\n+            \n+            return new NamedArgumentTypeEncoder<NameEncoder<LiteralEncoder<NamedArgumentsEncoder<T>>>>(\n+                new NameEncoder<LiteralEncoder<NamedArgumentsEncoder<T>>>(\n+                    new LiteralEncoder<NamedArgumentsEncoder<T>>(\n+                        new NamedArgumentsEncoder<T>(_continuation, (ushort)(_count - 1), writeCount: false))));\n+        }\n+\n+        public T EndArguments()\n+        {\n+            if (_count > 0)\n+            {\n+                throw new InvalidOperationException();\n+            }\n+\n+            if (_writeCount)\n+            {\n+                Builder.WriteUInt16(0);\n+            }\n+\n+            return _continuation;\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct NamedArgumentTypeEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+\n+        internal NamedArgumentTypeEncoder(T continuation)\n+        {\n+            _continuation = continuation;\n+        }\n+\n+        public CustomAttributeElementTypeEncoder<T> ScalarType()\n+        {\n+            return new CustomAttributeElementTypeEncoder<T>(_continuation);\n+        }\n+\n+        public T Object()\n+        {\n+            Builder.WriteByte(0x51); // OBJECT\n+            return _continuation;\n+        }\n+\n+        public CustomAttributeArrayTypeEncoder<T> SZArray()\n+        {\n+            return new CustomAttributeArrayTypeEncoder<T>(_continuation);\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct CustomAttributeArrayTypeEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+\n+        private readonly T _continuation;\n+\n+        internal CustomAttributeArrayTypeEncoder(T continuation)\n+        {\n+            _continuation = continuation;\n+        }\n+\n+        public T ObjectArray()\n+        {\n+            Builder.WriteByte((byte)SignatureTypeCode.SZArray);\n+            Builder.WriteByte(0x51); // OBJECT\n+            return _continuation;\n+        }\n+\n+        public CustomAttributeElementTypeEncoder<T> ElementType()\n+        {\n+            Builder.WriteByte((byte)SignatureTypeCode.SZArray);\n+            return new CustomAttributeElementTypeEncoder<T>(_continuation);\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct CustomAttributeElementTypeEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+\n+        private readonly T _continuation;\n+\n+        internal CustomAttributeElementTypeEncoder(T continuation)\n+        {\n+            _continuation = continuation;\n+        }\n+\n+        private T WriteTypeCode(SignatureTypeCode value)\n+        {\n+            Builder.WriteByte((byte)value);\n+            return _continuation;\n+        }\n+\n+        public T Boolean() => WriteTypeCode(SignatureTypeCode.Boolean);\n+        public T Char() => WriteTypeCode(SignatureTypeCode.Char);\n+        public T Int8() => WriteTypeCode(SignatureTypeCode.SByte);\n+        public T UInt8() => WriteTypeCode(SignatureTypeCode.Byte);\n+        public T Int16() => WriteTypeCode(SignatureTypeCode.Int16);\n+        public T UInt16() => WriteTypeCode(SignatureTypeCode.UInt16);\n+        public T Int32() => WriteTypeCode(SignatureTypeCode.Int32);\n+        public T UInt32() => WriteTypeCode(SignatureTypeCode.UInt32);\n+        public T Int64() => WriteTypeCode(SignatureTypeCode.Int64);\n+        public T UInt64() => WriteTypeCode(SignatureTypeCode.UInt64);\n+        public T Float32() => WriteTypeCode(SignatureTypeCode.Single);\n+        public T Float64() => WriteTypeCode(SignatureTypeCode.Double);\n+        public T String() => WriteTypeCode(SignatureTypeCode.String);\n+        public T IntPtr() => WriteTypeCode(SignatureTypeCode.IntPtr);\n+        public T UIntPtr() => WriteTypeCode(SignatureTypeCode.UIntPtr);\n+\n+#if !SRM\n+        public T PrimitiveType(PrimitiveTypeCode type)\n+        {\n+            switch (type)\n+            {\n+                case PrimitiveTypeCode.Boolean: return Boolean();\n+                case PrimitiveTypeCode.Char: return Char();\n+                case PrimitiveTypeCode.Int8: return Int8();\n+                case PrimitiveTypeCode.UInt8: return UInt8();\n+                case PrimitiveTypeCode.Int16: return Int16();\n+                case PrimitiveTypeCode.UInt16: return UInt16();\n+                case PrimitiveTypeCode.Int32: return Int32();\n+                case PrimitiveTypeCode.UInt32: return UInt32();\n+                case PrimitiveTypeCode.Int64: return Int64();\n+                case PrimitiveTypeCode.UInt64: return UInt64();\n+                case PrimitiveTypeCode.Float32: return Float32();\n+                case PrimitiveTypeCode.Float64: return Float64();\n+                case PrimitiveTypeCode.String: return String();\n+                case PrimitiveTypeCode.IntPtr: return IntPtr();\n+                case PrimitiveTypeCode.UIntPtr: return UIntPtr();\n+\n+                default:\n+                    throw new InvalidOperationException();\n+            }\n+        }\n+#endif\n+        public T SystemType()\n+        {\n+            Builder.WriteByte(0x50); // TYPE\n+            return _continuation;\n+        }\n+\n+        public T Enum(string enumTypeName)\n+        {\n+            Builder.WriteByte(0x55); // ENUM\n+            Builder.WriteSerializedString(enumTypeName);\n+            return _continuation;\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    enum FunctionPointerAttributes\n+    {\n+        None = SignatureAttributes.None,\n+        HasThis = SignatureAttributes.Instance,\n+        HasExplicitThis = SignatureAttributes.Instance | SignatureAttributes.ExplicitThis\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct SignatureTypeEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+\n+        public SignatureTypeEncoder(T continuation)\n+        {\n+            _continuation = continuation;\n+        }\n+\n+        private T WriteTypeCode(SignatureTypeCode value)\n+        {\n+            Builder.WriteByte((byte)value);\n+            return _continuation;\n+        }\n+\n+        private void ClassOrValue(bool isValueType)\n+        {\n+            Builder.WriteByte(isValueType ? (byte)0x11 : (byte)0x12); // CLASS|VALUETYPE\n+        }\n+\n+        public T Void() => WriteTypeCode(SignatureTypeCode.Void);\n+        public T Boolean() => WriteTypeCode(SignatureTypeCode.Boolean);\n+        public T Char() => WriteTypeCode(SignatureTypeCode.Char);\n+        public T Int8() => WriteTypeCode(SignatureTypeCode.SByte);\n+        public T UInt8() => WriteTypeCode(SignatureTypeCode.Byte);\n+        public T Int16() => WriteTypeCode(SignatureTypeCode.Int16);\n+        public T UInt16() => WriteTypeCode(SignatureTypeCode.UInt16);\n+        public T Int32() => WriteTypeCode(SignatureTypeCode.Int32);\n+        public T UInt32() => WriteTypeCode(SignatureTypeCode.UInt32);\n+        public T Int64() => WriteTypeCode(SignatureTypeCode.Int64);\n+        public T UInt64() => WriteTypeCode(SignatureTypeCode.UInt64);\n+        public T Float32() => WriteTypeCode(SignatureTypeCode.Single);\n+        public T Float64() => WriteTypeCode(SignatureTypeCode.Double);\n+        public T String() => WriteTypeCode(SignatureTypeCode.String);\n+        public T IntPtr() => WriteTypeCode(SignatureTypeCode.IntPtr);\n+        public T UIntPtr() => WriteTypeCode(SignatureTypeCode.UIntPtr);\n+\n+#if !SRM\n+        public T PrimitiveType(PrimitiveTypeCode type)\n+        {\n+            switch (type)\n+            {\n+                case PrimitiveTypeCode.Void: return Void();\n+                case PrimitiveTypeCode.Boolean: return Boolean();\n+                case PrimitiveTypeCode.Char: return Char();\n+                case PrimitiveTypeCode.Int8: return Int8();\n+                case PrimitiveTypeCode.UInt8: return UInt8();\n+                case PrimitiveTypeCode.Int16: return Int16();\n+                case PrimitiveTypeCode.UInt16: return UInt16();\n+                case PrimitiveTypeCode.Int32: return Int32();\n+                case PrimitiveTypeCode.UInt32: return UInt32();\n+                case PrimitiveTypeCode.Int64: return Int64();\n+                case PrimitiveTypeCode.UInt64: return UInt64();\n+                case PrimitiveTypeCode.Float32: return Float32();\n+                case PrimitiveTypeCode.Float64: return Float64();\n+                case PrimitiveTypeCode.String: return String();\n+                case PrimitiveTypeCode.IntPtr: return IntPtr();\n+                case PrimitiveTypeCode.UIntPtr: return UIntPtr();\n+                default:\n+                    throw new InvalidOperationException();\n+            }\n+        }\n+#endif\n+        public T Object() => WriteTypeCode(SignatureTypeCode.Object);\n+\n+        public CustomModifiersEncoder<SignatureTypeEncoder<ArrayShapeEncoder<T>>> Array()\n+        {\n+            Builder.WriteByte((byte)SignatureTypeCode.Array);\n+\n+            return new CustomModifiersEncoder<SignatureTypeEncoder<ArrayShapeEncoder<T>>>(\n+                new SignatureTypeEncoder<ArrayShapeEncoder<T>>(\n+                    new ArrayShapeEncoder<T>(_continuation)));\n+        }\n+\n+        public T TypeDefOrRefOrSpec(bool isValueType, uint typeRefDefSpecCodedIndex)\n+        {\n+            ClassOrValue(isValueType);\n+            Builder.WriteCompressedInteger(typeRefDefSpecCodedIndex);\n+            return _continuation;\n+        }\n+\n+        public MethodSignatureEncoder<T> FunctionPointer(SignatureCallingConvention convention, FunctionPointerAttributes attributes, int genericParameterCount)\n+        {\n+            // Spec:\n+            // The EXPLICITTHIS (0x40) bit can be set only in signatures for function pointers.\n+            // If EXPLICITTHIS (0x40) in the signature is set, then HASTHIS (0x20) shall also be set.\n+\n+            if (attributes != FunctionPointerAttributes.None &&\n+                attributes != FunctionPointerAttributes.HasThis &&\n+                attributes != FunctionPointerAttributes.HasExplicitThis)\n+            {\n+                throw new ArgumentException(nameof(attributes));\n+            }\n+\n+            Builder.WriteByte((byte)SignatureTypeCode.FunctionPointer);\n+            Builder.WriteByte(BlobEncoder.SignatureHeader(SignatureKind.Method, convention, (SignatureAttributes)attributes).RawValue);\n+\n+            if (genericParameterCount != 0)\n+            {\n+                Builder.WriteCompressedInteger((uint)genericParameterCount);\n+            }\n+\n+            return new MethodSignatureEncoder<T>(_continuation, isVarArg: convention == SignatureCallingConvention.VarArgs);\n+        }\n+\n+        public GenericTypeArgumentsEncoder<T> GenericInstantiation(bool isValueType, uint typeRefDefSpecCodedIndex, int genericArgumentCount)\n+        {\n+            Builder.WriteByte((byte)SignatureTypeCode.GenericTypeInstance);\n+            ClassOrValue(isValueType);\n+            Builder.WriteCompressedInteger(typeRefDefSpecCodedIndex);\n+            Builder.WriteCompressedInteger((uint)genericArgumentCount);\n+            return new GenericTypeArgumentsEncoder<T>(_continuation, genericArgumentCount);\n+        }\n+\n+        public T GenericMethodTypeParameter(int parameterIndex)\n+        {\n+            Builder.WriteByte((byte)SignatureTypeCode.GenericMethodParameter);\n+            Builder.WriteCompressedInteger((uint)parameterIndex);\n+            return _continuation;\n+        }\n+\n+        public T GenericTypeParameter(uint parameterIndex)\n+        {\n+            Builder.WriteByte((byte)SignatureTypeCode.GenericTypeParameter);\n+            Builder.WriteCompressedInteger(parameterIndex);\n+            return _continuation;\n+        }\n+\n+        public CustomModifiersEncoder<SignatureTypeEncoder<T>> Pointer()\n+        {\n+            Builder.WriteByte((byte)SignatureTypeCode.Pointer);\n+            return new CustomModifiersEncoder<SignatureTypeEncoder<T>>(this);\n+        }\n+\n+        public CustomModifiersEncoder<SignatureTypeEncoder<T>> SZArray()\n+        {\n+            Builder.WriteByte((byte)SignatureTypeCode.SZArray);\n+            return new CustomModifiersEncoder<SignatureTypeEncoder<T>>(this);\n+        }\n+    }\n+\n+#if SRM\n+    public\n+#endif\n+    struct CustomModifiersEncoder<T> : IBlobEncoder\n+        where T : IBlobEncoder\n+    {\n+        public BlobBuilder Builder => _continuation.Builder;\n+        private readonly T _continuation;\n+\n+        public CustomModifiersEncoder(T continuation)\n+        {\n+            _continuation = continuation;\n+        }\n+\n+        public CustomModifiersEncoder<T> AddModifier(bool isOptional, uint typeDefRefSpecCodedIndex)","path":"src/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/Blobs/BlobEncoders.cs","position":956,"original_position":956,"commit_id":"ea707e30ad4aed67602a6a2f45b3423a2aec8c86","original_commit_id":"ea707e30ad4aed67602a6a2f45b3423a2aec8c86","user":{"login":"nguerrera","id":75470,"avatar_url":"https://avatars.githubusercontent.com/u/75470?v=3","gravatar_id":"","url":"https://api.github.com/users/nguerrera","html_url":"https://github.com/nguerrera","followers_url":"https://api.github.com/users/nguerrera/followers","following_url":"https://api.github.com/users/nguerrera/following{/other_user}","gists_url":"https://api.github.com/users/nguerrera/gists{/gist_id}","starred_url":"https://api.github.com/users/nguerrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguerrera/subscriptions","organizations_url":"https://api.github.com/users/nguerrera/orgs","repos_url":"https://api.github.com/users/nguerrera/repos","events_url":"https://api.github.com/users/nguerrera/events{/privacy}","received_events_url":"https://api.github.com/users/nguerrera/received_events","type":"User","site_admin":false},"body":"I used isRequired in signature decoder, we should use the same throughout.","created_at":"2016-01-13T01:26:40Z","updated_at":"2016-01-13T01:26:40Z","html_url":"https://github.com/dotnet/corefx/pull/5354#discussion_r49541167","pull_request_url":"https://api.github.com/repos/dotnet/corefx/pulls/5354","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments/49541167"},"html":{"href":"https://github.com/dotnet/corefx/pull/5354#discussion_r49541167"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/5354"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/5354","id":55835745,"html_url":"https://github.com/dotnet/corefx/pull/5354","diff_url":"https://github.com/dotnet/corefx/pull/5354.diff","patch_url":"https://github.com/dotnet/corefx/pull/5354.patch","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/5354","number":5354,"state":"open","locked":false,"title":"PEBuilder implementation","user":{"login":"tmat","id":41759,"avatar_url":"https://avatars.githubusercontent.com/u/41759?v=3","gravatar_id":"","url":"https://api.github.com/users/tmat","html_url":"https://github.com/tmat","followers_url":"https://api.github.com/users/tmat/followers","following_url":"https://api.github.com/users/tmat/following{/other_user}","gists_url":"https://api.github.com/users/tmat/gists{/gist_id}","starred_url":"https://api.github.com/users/tmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmat/subscriptions","organizations_url":"https://api.github.com/users/tmat/orgs","repos_url":"https://api.github.com/users/tmat/repos","events_url":"https://api.github.com/users/tmat/events{/privacy}","received_events_url":"https://api.github.com/users/tmat/received_events","type":"User","site_admin":false},"body":"An initial implementation taken from Roslyn (PR: https://github.com/dotnet/roslyn/pull/7683)\r\n\r\nThe API is still very much in flux with known issues. Having it in System.Metadata.Reader beta build however allows partners to start building on top of it and provide feedback. ","created_at":"2016-01-12T23:52:50Z","updated_at":"2016-01-13T01:26:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c036a50fc09d4cecc22be214c7727ca8a5d7c1a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefx/pulls/5354/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefx/pulls/5354/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/5354/comments","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/ea707e30ad4aed67602a6a2f45b3423a2aec8c86","head":{"label":"tmat:PEBuilder","ref":"PEBuilder","sha":"ea707e30ad4aed67602a6a2f45b3423a2aec8c86","user":{"login":"tmat","id":41759,"avatar_url":"https://avatars.githubusercontent.com/u/41759?v=3","gravatar_id":"","url":"https://api.github.com/users/tmat","html_url":"https://github.com/tmat","followers_url":"https://api.github.com/users/tmat/followers","following_url":"https://api.github.com/users/tmat/following{/other_user}","gists_url":"https://api.github.com/users/tmat/gists{/gist_id}","starred_url":"https://api.github.com/users/tmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmat/subscriptions","organizations_url":"https://api.github.com/users/tmat/orgs","repos_url":"https://api.github.com/users/tmat/repos","events_url":"https://api.github.com/users/tmat/events{/privacy}","received_events_url":"https://api.github.com/users/tmat/received_events","type":"User","site_admin":false},"repo":{"id":33101159,"name":"corefx","full_name":"tmat/corefx","owner":{"login":"tmat","id":41759,"avatar_url":"https://avatars.githubusercontent.com/u/41759?v=3","gravatar_id":"","url":"https://api.github.com/users/tmat","html_url":"https://github.com/tmat","followers_url":"https://api.github.com/users/tmat/followers","following_url":"https://api.github.com/users/tmat/following{/other_user}","gists_url":"https://api.github.com/users/tmat/gists{/gist_id}","starred_url":"https://api.github.com/users/tmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmat/subscriptions","organizations_url":"https://api.github.com/users/tmat/orgs","repos_url":"https://api.github.com/users/tmat/repos","events_url":"https://api.github.com/users/tmat/events{/privacy}","received_events_url":"https://api.github.com/users/tmat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tmat/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.","fork":true,"url":"https://api.github.com/repos/tmat/corefx","forks_url":"https://api.github.com/repos/tmat/corefx/forks","keys_url":"https://api.github.com/repos/tmat/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmat/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmat/corefx/teams","hooks_url":"https://api.github.com/repos/tmat/corefx/hooks","issue_events_url":"https://api.github.com/repos/tmat/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/tmat/corefx/events","assignees_url":"https://api.github.com/repos/tmat/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/tmat/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/tmat/corefx/tags","blobs_url":"https://api.github.com/repos/tmat/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmat/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmat/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmat/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmat/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/tmat/corefx/languages","stargazers_url":"https://api.github.com/repos/tmat/corefx/stargazers","contributors_url":"https://api.github.com/repos/tmat/corefx/contributors","subscribers_url":"https://api.github.com/repos/tmat/corefx/subscribers","subscription_url":"https://api.github.com/repos/tmat/corefx/subscription","commits_url":"https://api.github.com/repos/tmat/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmat/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmat/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmat/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmat/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/tmat/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmat/corefx/merges","archive_url":"https://api.github.com/repos/tmat/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmat/corefx/downloads","issues_url":"https://api.github.com/repos/tmat/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/tmat/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/tmat/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/tmat/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmat/corefx/labels{/name}","releases_url":"https://api.github.com/repos/tmat/corefx/releases{/id}","created_at":"2015-03-30T03:23:20Z","updated_at":"2015-05-05T21:53:10Z","pushed_at":"2016-01-13T00:05:44Z","git_url":"git://github.com/tmat/corefx.git","ssh_url":"git@github.com:tmat/corefx.git","clone_url":"https://github.com/tmat/corefx.git","svn_url":"https://github.com/tmat/corefx","homepage":"","size":44760,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"f91c9eee685dccc38490a2f6c2ae3b3003e61924","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":26295345,"name":"corefx","full_name":"dotnet/corefx","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others.","fork":false,"url":"https://api.github.com/repos/dotnet/corefx","forks_url":"https://api.github.com/repos/dotnet/corefx/forks","keys_url":"https://api.github.com/repos/dotnet/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefx/teams","hooks_url":"https://api.github.com/repos/dotnet/corefx/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefx/events","assignees_url":"https://api.github.com/repos/dotnet/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefx/tags","blobs_url":"https://api.github.com/repos/dotnet/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefx/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefx/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefx/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefx/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefx/subscription","commits_url":"https://api.github.com/repos/dotnet/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefx/merges","archive_url":"https://api.github.com/repos/dotnet/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefx/downloads","issues_url":"https://api.github.com/repos/dotnet/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefx/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefx/releases{/id}","created_at":"2014-11-06T23:42:48Z","updated_at":"2016-01-12T22:28:26Z","pushed_at":"2016-01-13T01:14:17Z","git_url":"git://github.com/dotnet/corefx.git","ssh_url":"git@github.com:dotnet/corefx.git","clone_url":"https://github.com/dotnet/corefx.git","svn_url":"https://github.com/dotnet/corefx","homepage":"http://dotnet.github.io/","size":54917,"stargazers_count":8914,"watchers_count":8914,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2056,"mirror_url":null,"open_issues_count":842,"forks":2056,"open_issues":842,"watchers":8914,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/5354"},"html":{"href":"https://github.com/dotnet/corefx/pull/5354"},"issue":{"href":"https://api.github.com/repos/dotnet/corefx/issues/5354"},"comments":{"href":"https://api.github.com/repos/dotnet/corefx/issues/5354/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/5354/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/5354/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefx/statuses/ea707e30ad4aed67602a6a2f45b3423a2aec8c86"}}}}