Ejemplo n.º 1
0
        public override FilePosition GetDefinitionPosition()
        {
            IMethod m = GetMethodIfSingleOverload();

            if (m != null)
            {
                return(MemberResolveResult.GetDefinitionPosition(m));
            }
            else
            {
                return(base.GetDefinitionPosition());
            }
        }
Ejemplo n.º 2
0
        public override FilePosition GetDefinitionPosition()
        {
            IMethod m  = GetMethodIfSingleOverload();
            IMethod m2 = GetMethodWithEmptyParameterList();

            if (m != null)
            {
                return(MemberResolveResult.GetDefinitionPosition(m));
            }
            else if (m2 != null)
            {
                return(MemberResolveResult.GetDefinitionPosition(m2));
            }
            else
            {
                return(base.GetDefinitionPosition());
            }
        }
Ejemplo n.º 3
0
		void GotoMember(IMember member)
		{
			MemberResolveResult resolveResult = new MemberResolveResult(null, null, member);
			GotoFilePosition(resolveResult.GetDefinitionPosition());
		}
Ejemplo n.º 4
0
		static FileLineReference FindTest(TestMember testMember)
		{
			MemberResolveResult resolveResult = new MemberResolveResult(null, null, testMember.Member);
			FilePosition filePos = resolveResult.GetDefinitionPosition();
			return new FileLineReference(filePos.FileName, filePos.Line - 1, filePos.Column - 1);
		}
Ejemplo n.º 5
0
		/// <summary>
		/// Returns the location of the specified test method in the
		/// project being tested.
		/// </summary>
		FileLineReference FindTest(string methodName)
		{
			TestProject testProject = GetTestProject(currentProject);
			if (testProject != null) {
				TestMethod method = testProject.TestClasses.GetTestMethod(methodName);
				if (method != null) {
					MemberResolveResult resolveResult = new MemberResolveResult(null, null, method.Method);
					FilePosition filePos = resolveResult.GetDefinitionPosition();
					return new FileLineReference(filePos.FileName, filePos.Line, filePos.Column);
				}
			}
			return null;
		}