Ejemplo n.º 1
0
        internal override int GetConstants(int bufferLength, out int count, ISymUnmanagedConstant[] constants)
        {
            var symReader = SymMethod.SymReader;
            var mdReader = symReader.MetadataReader;
            var scope = mdReader.GetLocalScope(_handle);

            var handles = scope.GetLocalConstants();

            int i = 0;
            foreach (var handle in handles)
            {
                if (i >= bufferLength)
                {
                    break;
                }

                constants[i++] = new SymConstant(symReader, handle);
            }

            count = (bufferLength == 0) ? handles.Count : i;
            return HResult.S_OK;
        }
Ejemplo n.º 2
0
        internal override int GetConstants(int bufferLength, out int count, ISymUnmanagedConstant[] constants)
        {
            var pdbReader = SymMethod.PdbReader;
            var scope     = pdbReader.MetadataReader.GetLocalScope(_handle);

            var handles = scope.GetLocalConstants();

            int i = 0;

            foreach (var handle in handles)
            {
                if (i >= bufferLength)
                {
                    break;
                }

                constants[i++] = new SymConstant(pdbReader, handle);
            }

            count = (bufferLength == 0) ? handles.Count : i;
            return(HResult.S_OK);
        }