Пример #1
0
        public void upgrade(OldTSpace.TypeRepTemplate inV, NewTSpace.InterfaceRepTemplate outV)
        {
            upgrade(inV as OldTSpace.TypeRepTemplate, outV as NewTSpace.TypeRepTemplate);

            outV.Inherits = inV.Inherits;
            outV.Imports  = inV.Imports;
            if (!String.IsNullOrEmpty(inV.Java))
            {
                outV.Java = inV.Java;
            }


            foreach (OldTSpace.MethodRepTemplate inM in inV.Methods)
            {
                NewTSpace.MethodRepTemplate outM = new NewTSpace.MethodRepTemplate();
                upgrade(inM, outM);
                outV.Methods.Add(outM);
            }

            foreach (OldTSpace.PropRepTemplate inP in inV.Properties)
            {
                NewTSpace.PropRepTemplate outP = new NewTSpace.PropRepTemplate();
                upgrade(inP, outP);
                outV.Properties.Add(outP);
            }
        }
Пример #2
0
        public void upgrade(OldTSpace.MethodRepTemplate inV, NewTSpace.MethodRepTemplate outV)
        {
            upgrade(inV as OldTSpace.ConstructorRepTemplate, outV as NewTSpace.ConstructorRepTemplate);

            outV.Name = inV.Name;
            // Methods should have a return type, but in at least one case don't ...
            outV.Return = inV.Return ?? "System.Void";
        }
Пример #3
0
		public void upgrade(OldTSpace.TypeRepTemplate inV, NewTSpace.InterfaceRepTemplate outV) {
			
			upgrade(inV as OldTSpace.TypeRepTemplate, outV as NewTSpace.TypeRepTemplate);
	
			outV.Inherits = inV.Inherits;
			outV.Imports = inV.Imports;	
			if (!String.IsNullOrEmpty(inV.Java))
				outV.Java = inV.Java;			
			
			
			foreach (OldTSpace.MethodRepTemplate inM in inV.Methods) {			
				NewTSpace.MethodRepTemplate outM = new NewTSpace.MethodRepTemplate();
				upgrade(inM, outM);
				outV.Methods.Add(outM);
			}		

			foreach (OldTSpace.PropRepTemplate inP in inV.Properties) {			
				NewTSpace.PropRepTemplate outP = new NewTSpace.PropRepTemplate();
				upgrade(inP, outP);
				outV.Properties.Add(outP);
			}		

		}