OpenMethod() public method

public OpenMethod ( ICompileUnit file, int ns_id, IMethodDef method ) : SourceMethodBuilder
file ICompileUnit
ns_id int
method IMethodDef
return SourceMethodBuilder
コード例 #1
0
        public void SetMethodSourceRange(
            ISymbolDocumentWriter startDoc,
            int startLine,
            int startColumn,
            ISymbolDocumentWriter endDoc,
            int endLine,
            int endColumn)
        {
            int nsId            = GetCurrentNamespace(startDoc);
            SourceMethodImpl sm = new SourceMethodImpl(methodName, currentToken, nsId);

            msw.OpenMethod(((ICompileUnit)startDoc).Entry, nsId, sm);
            methodOpened = true;
        }
コード例 #2
0
        public void SetMethodSourceRange(
            ISymbolDocumentWriter startDoc,
            int startLine,
            int startColumn,
            ISymbolDocumentWriter endDoc,
            int endLine,
            int endColumn)
        {
#if FIXME
            SourceMethodImpl sm = new SourceMethodImpl(methodName, currentToken, GetCurrentNamespace(startDoc));
            msw.OpenMethod(startDoc as ISourceFile, sm, startLine, startColumn, endLine, endColumn);
            methodOpened = true;
#endif
        }
コード例 #3
0
		public void Close()
		{
			MonoSymbolWriter writer = new MonoSymbolWriter(moduleBuilder.FullyQualifiedName);

			foreach (Method method in methods.Values)
			{
				if (method.document != null)
				{
					if (method.document.source == null)
					{
						method.document.source = new SourceFileEntry(writer.SymbolFile, method.document.url);
					}
					ICompileUnit file = new CompileUnitEntry(writer.SymbolFile, method.document.source);
					SourceMethodBuilder smb = writer.OpenMethod(file, 0, method);
					for (int i = 0; i < method.offsets.Length; i++)
					{
						smb.MarkSequencePoint(method.offsets[i], method.document.source, method.lines[i], method.columns[i], false);
					}
					for (int i = 0; i < method.variables.Count; i++)
					{
						writer.DefineLocalVariable(i, method.variables[i]);
					}
					writer.CloseMethod();
				}
			}

			writer.WriteSymbolFile(moduleBuilder.ModuleVersionId);
		}
コード例 #4
0
        public void OpenMethod(uint method)
        {
            var sm = new SourceMethodImpl(writer.GetMethodDefinition(method).Name, (int)method);

            msw.OpenMethod(null, 0, sm);
        }