コード例 #1
0
		void CreateClassWithOneEvent()
		{
			resolverHelper = new PythonResolverTestsHelper();
			myClass = resolverHelper.CreateClass("MyClass");
			myClassField = myClass.AddField("MyField");
			
			resolverHelper.ProjectContent.SetClassToReturnFromGetClass("MyClass", myClass);
		}
コード例 #2
0
		void CreateClassWithOneProperty()
		{
			resolverHelper = new PythonResolverTestsHelper();
			myClass = resolverHelper.CreateClass("MyClass");
			myClass.AddMethod("MyMethod");
			
			resolverHelper.ProjectContent.SetClassToReturnFromGetClass("MyClass", myClass);
		}
コード例 #3
0
		void CreateResolver(string code)
		{
			resolverHelper = new PythonResolverTestsHelper(code);
			
			testClass = resolverHelper.CreateClass("Test.Test1");
			resolverHelper.ProjectContent.ClassesInProjectContent.Add(testClass);			
			resolverHelper.ProjectContent.SetClassToReturnFromGetClass("Test.Test1", testClass);
		}
コード例 #4
0
		void CreateResolver()
		{
			resolverHelper = new PythonResolverTestsHelper();
			myClass = resolverHelper.CreateClass("MyClass");
			myMethod = myClass.AddMethod("MyMethod");
			myMethod.ReturnType = new DefaultReturnType(myClass);
			
			resolverHelper.ProjectContent.SetClassToReturnFromGetClass("MyClass", myClass);
		}
コード例 #5
0
		void CreateClassWithOneProperty()
		{
			resolverHelper = new PythonResolverTestsHelper();
			myClass = resolverHelper.CreateClass("MyClass");
			myClassProperty = myClass.AddProperty("MyProperty");
			
			AddNestedPropertyToExistingProperty();
			
			resolverHelper.ProjectContent.SetClassToReturnFromGetClass("MyClass", myClass);
		}
コード例 #6
0
		void CreateClassWithOneEvent()
		{
			// Define imports.
			string code = 
				"from MyNamespace import MyClass";
			
			resolverHelper = new PythonResolverTestsHelper(code);
			myClass = resolverHelper.CreateClass("MyClass");
			myClassEvent = myClass.AddEvent("MyEvent");
			
			AddEventHandlerClass();
			
			resolverHelper.ProjectContent.SetClassToReturnFromGetClass("MyNamespace.MyClass", myClass);
		}