当前位置: 首页>>代码示例>>C#>>正文


C# ISymUnmanagedVariable类代码示例

本文整理汇总了C#中ISymUnmanagedVariable的典型用法代码示例。如果您正苦于以下问题:C# ISymUnmanagedVariable类的具体用法?C# ISymUnmanagedVariable怎么用?C# ISymUnmanagedVariable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ISymUnmanagedVariable类属于命名空间,在下文中一共展示了ISymUnmanagedVariable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SymVariable

        internal SymVariable(ISymUnmanagedVariable variable)
        {
            // We should not wrap null instances
            if (variable == null)
                throw new ArgumentNullException("variable");

            m_unmanagedVariable = variable;
        }
开发者ID:OpenRIAServices,项目名称:OpenRiaServices,代码行数:8,代码来源:symvariable.cs

示例2: SymbolVariable

 internal SymbolVariable(ISymUnmanagedVariable unmanagedVariable)
 {
     if (unmanagedVariable == null)
     {
         throw new ArgumentNullException("unmanagedVariable");
     }
     this.unmanagedVariable = unmanagedVariable;
 }
开发者ID:modulexcite,项目名称:FieldLog,代码行数:8,代码来源:SymbolVariable.cs

示例3: GetGlobalVariables

		public ISymbolVariable[] GetGlobalVariables() {
			uint numVars;
			reader.GetGlobalVariables(0, out numVars, null);
			var unVars = new ISymUnmanagedVariable[numVars];
			reader.GetGlobalVariables((uint)unVars.Length, out numVars, unVars);
			var vars = new ISymbolVariable[numVars];
			for (uint i = 0; i < numVars; i++)
				vars[i] = new SymbolVariable(unVars[i]);
			return vars;
		}
开发者ID:EmilZhou,项目名称:dnlib,代码行数:10,代码来源:SymbolReader.cs

示例4: GetParameters

		public ISymbolVariable[] GetParameters() {
			uint numVars;
			method.GetParameters(0, out numVars, null);
			var unVars = new ISymUnmanagedVariable[numVars];
			method.GetParameters((uint)unVars.Length, out numVars, unVars);
			var vars = new ISymbolVariable[numVars];
			for (uint i = 0; i < numVars; i++)
				vars[i] = new SymbolVariable(unVars[i]);
			return vars;
		}
开发者ID:KitoHo,项目名称:Reflexil,代码行数:10,代码来源:SymbolMethod.cs

示例5: GetVariables

        public ISymbolVariable[] GetVariables()
        {
            int cVars = 0;
            uint i;
            m_unmanagedNamespace.GetVariables(0, out cVars, null);
            var unmanagedVariables = new ISymUnmanagedVariable[cVars];
            m_unmanagedNamespace.GetVariables(cVars, out cVars, unmanagedVariables);

            var Variables = new ISymbolVariable[cVars];
            for (i = 0; i < cVars; i++)
            {
                Variables[i] = new SymVariable(unmanagedVariables[i]);
            }
            return Variables;
        }
开发者ID:pusp,项目名称:o2platform,代码行数:15,代码来源:SymNamespace.cs

示例6: GetLocals

        internal override int GetLocals(int bufferLength, out int count, ISymUnmanagedVariable[] locals)
        {
            var mdReader = SymMethod.MetadataReader;
            var scope = mdReader.GetLocalScope(_handle);

            var handles = scope.GetLocalVariables();

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

                locals[i++] = new SymVariable(SymMethod, handle);
            }

            count = (bufferLength == 0) ? handles.Count : i;
            return HResult.S_OK;
        }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:21,代码来源:ChildScopeData.cs

示例7: SymbolVariable

		public SymbolVariable(ISymUnmanagedVariable variable) {
			this.variable = variable;
		}
开发者ID:KitoHo,项目名称:Reflexil,代码行数:3,代码来源:SymbolVariable.cs

示例8: ProbeScopeForLocals

        //
        // Gather the local details in a scope and then recurse to child scopes
        //
        private void ProbeScopeForLocals(List<ILLocalVariable> variables, ISymUnmanagedScope scope)
        {
            int localCount;
            ThrowExceptionForHR(scope.GetLocalCount(out localCount));

            ISymUnmanagedVariable[] locals = new ISymUnmanagedVariable[localCount];
            ThrowExceptionForHR(scope.GetLocals(localCount, out localCount, locals));

            for (int i = 0; i < localCount; i++)
            {
                var local = locals[i];

                int slot;
                ThrowExceptionForHR(local.GetAddressField1(out slot));

                int nameLength;
                ThrowExceptionForHR(local.GetName(0, out nameLength, null));

                // nameLength includes terminating '\0'
                char[] nameBuffer = new char[nameLength];
                ThrowExceptionForHR(local.GetName(nameLength, out nameLength, nameBuffer));

                int attributes;
                ThrowExceptionForHR(local.GetAttributes(out attributes));

                variables.Add(new ILLocalVariable() { Slot = slot, Name = new String(nameBuffer, 0, nameLength - 1), CompilerGenerated = (attributes & 0x1) != 0 });
            }

            int childrenCount;
            ThrowExceptionForHR(scope.GetChildren(0, out childrenCount, null));

            ISymUnmanagedScope[] children = new ISymUnmanagedScope[childrenCount];
            ThrowExceptionForHR(scope.GetChildren(childrenCount, out childrenCount, children));

            for (int i = 0; i < childrenCount; i++)
            {
                ProbeScopeForLocals(variables, children[i]);
            }
        }
开发者ID:Maoni0,项目名称:corert,代码行数:42,代码来源:UnmanagedPdbSymbolReader.cs

示例9: GetVariables

        public ISymbolVariable[] GetVariables(SymbolToken parent)
        {
            int cVars = 0;
            uint i;
            m_reader.GetVariables(parent, 0, out cVars, null);
            ISymUnmanagedVariable[] unmanagedVariables = new ISymUnmanagedVariable[cVars];
            m_reader.GetVariables(parent, cVars, out cVars, unmanagedVariables);
            SymVariable[] variables = new SymVariable[cVars];

            for (i = 0; i < cVars; i++)
            {
                variables[i] = new SymVariable(unmanagedVariables[i]);
            }
            return variables;
        }
开发者ID:uQr,项目名称:Visual-NHibernate,代码行数:15,代码来源:SymReader.cs

示例10: GetParameters

 public int GetParameters(int cParams, out int pcParams, ISymUnmanagedVariable[] parms)
 {
     throw new NotImplementedException();
 }
开发者ID:elemk0vv,项目名称:roslyn-1,代码行数:4,代码来源:SymReader.cs

示例11: GetVariables

		public ISymbolVariable[] GetVariables(SymbolToken parent) {
			uint numVars;
			reader.GetVariables((uint)parent.GetToken(), 0, out numVars, null);
			var unVars = new ISymUnmanagedVariable[numVars];
			reader.GetVariables((uint)parent.GetToken(), (uint)unVars.Length, out numVars, unVars);
			var vars = new ISymbolVariable[numVars];
			for (uint i = 0; i < numVars; i++)
				vars[i] = new SymbolVariable(unVars[i]);
			return vars;
		}
开发者ID:EmilZhou,项目名称:dnlib,代码行数:10,代码来源:SymbolReader.cs

示例12: _PrintLocals

            static void _PrintLocals(ICorDebugILFrame ilframe, ISymUnmanagedScope unmScope, uint ip, System.IO.TextWriter writer)
            {
                int varcount;
                unmScope.GetLocalCount(out varcount);
                ISymUnmanagedVariable[] vars = new ISymUnmanagedVariable[varcount];
                unmScope.GetLocals(varcount, out varcount, vars);

                for (int iv = 0; iv < varcount; iv++)
                {
                    ISymUnmanagedVariable var = vars[iv];
                    string varname;
                    {
                        int namelen;
                        var.GetName(0, out namelen, null);
                        StringBuilder sbName = new StringBuilder(namelen);
                        var.GetName(sbName.Capacity, out namelen, sbName);
                        namelen--; // Remove nul.
                        sbName.Length = namelen;
                        varname = sbName.ToString();
                    }
                    string valstr;
                    {
                        int field1;
                        var.GetAddressField1(out field1);
                        ICorDebugValue pvalue;
                        ilframe.GetLocalVariable((uint)field1, out pvalue);
                        valstr = ToString(pvalue);
                    }
                    writer.WriteLine("{0}={1}", varname, valstr);
                }

                int cChildren;
                unmScope.GetChildren(0, out cChildren, null);
                ISymUnmanagedScope[] children = new ISymUnmanagedScope[cChildren];
                unmScope.GetChildren(children.Length, out cChildren, children);
                for (int ic = 0; ic < cChildren; ic++)
                {
                    _PrintLocals(ilframe, children[ic], ip, writer);
                }

            }
开发者ID:erisonliang,项目名称:qizmt,代码行数:41,代码来源:Program.cs

示例13: GetLocals

		public static ISymUnmanagedVariable[] GetLocals(this ISymUnmanagedScope symScope)
		{
			uint count;
			symScope.GetLocals(0, out count, new ISymUnmanagedVariable[0]);
			ISymUnmanagedVariable[] locals = new ISymUnmanagedVariable[count];
			symScope.GetLocals(count, out count, locals);
			return locals;
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:8,代码来源:CorSymExtensionMethods.cs

示例14: GetLocals

        public ISymbolVariable[] GetLocals()
        {
            int count;
            m_target.GetLocals(0, out count, null);
            ISymUnmanagedVariable[] uVariables = new ISymUnmanagedVariable[count];
            m_target.GetLocals(count, out count, uVariables);

            int i;
            ISymbolVariable[] variables = new ISymbolVariable[count];
            for (i = 0; i < count; i++)
            {
                variables[i] = new SymVariable(uVariables[i]);
            }
            return variables;
        }
开发者ID:ScottWeinstein,项目名称:ILUnMerge,代码行数:15,代码来源:SymScope.cs

示例15: GetLocals

 internal override int GetLocals(int bufferLength, out int count, ISymUnmanagedVariable[] locals)
 {
     // C# and VB never define any locals in the root scope 
     count = 0;
     return HResult.S_OK;
 }
开发者ID:GeertVL,项目名称:roslyn,代码行数:6,代码来源:RootScopeData.cs


注:本文中的ISymUnmanagedVariable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。