Example #1
0
        public static unsafe void DefineConstant2(this ISymUnmanagedWriter2 writer, string name, object value, uint sigToken)
        {
            VariantStructure variant = new VariantStructure();

            Marshal.GetNativeVariantForObject(value, new IntPtr(&variant));
            writer.DefineConstant2(name, variant, sigToken);
        }
Example #2
0
 private unsafe void DefineLocalConstantImpl(string name, object value, uint sigToken)
 {
     VariantStructure variant = new VariantStructure();
     Marshal.GetNativeVariantForObject(value, new IntPtr(&variant));
     _symWriter.DefineConstant2(name, variant, sigToken);
 }
Example #3
0
        private unsafe void DefineLocalConstantImpl(string name, object value, uint sigToken)
        {
            VariantStructure variant = new VariantStructure();
#pragma warning disable CS0618 // Type or member is obsolete
            Marshal.GetNativeVariantForObject(value, new IntPtr(&variant));
#pragma warning restore CS0618 // Type or member is obsolete
            _symWriter.DefineConstant2(name, variant, sigToken);
        }
Example #4
0
 public static unsafe void DefineConstant2(this ISymUnmanagedWriter2 writer, string name, object value, uint sigToken)
 {
     VariantStructure variant = new VariantStructure();
     Marshal.GetNativeVariantForObject(value, new IntPtr(&variant));
     writer.DefineConstant2(name, variant, sigToken);
 }
		public void DefineConstant2 (string name, VariantStructure value, uint sigToken)
		{
			//Mdb doesn't support constant values.
			//Constant values are lost at compile time and are not part of ILs/Stack.
			//So in case of PDB this values are stored inside PDB so debugger can display this values in IDE.
			//But in case of MDB. IDE displays this values from SyntaxTree knowledge. This has drawback
			//this value can be seen only by hovering mouse over constant name in code and can't be visible in Locals as
			//in case of PDB.(in theory TypeSystem/SyntaxTree could inform Locals about constants in current method)
		}