예제 #1
0
        // Here's where we do the real work...
        public static void addOldNetTranslation(string fullName)
        {
            Stream s = new FileStream(fullName, FileMode.Open, FileAccess.Read);
            OldT   t = OldT.newInstance(s);

            oldAppEnv[t.TypeName] = t;
        }
예제 #2
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);
            }
        }
예제 #3
0
        public NewTSpace.TypeRepTemplate upgrade(OldTSpace.TypeRepTemplate inTemplate)
        {
            inProgress = inTemplate;

            OldTSpace.StructRepTemplate strukt = inTemplate as OldTSpace.StructRepTemplate;
            if (strukt != null)
            {
                NewTSpace.StructRepTemplate res = new NewTSpace.StructRepTemplate();
                upgrade(strukt, res);
                return(res);
            }
            OldTSpace.ClassRepTemplate klass = inTemplate as OldTSpace.ClassRepTemplate;
            if (klass != null)
            {
                NewTSpace.ClassRepTemplate res = new NewTSpace.ClassRepTemplate();
                upgrade(klass, res);
                return(res);
            }
            OldTSpace.InterfaceRepTemplate iface = inTemplate as OldTSpace.InterfaceRepTemplate;
            if (iface != null)
            {
                NewTSpace.InterfaceRepTemplate res = new NewTSpace.InterfaceRepTemplate();
                upgrade(iface, res);
                return(res);
            }

            throw new System.NotImplementedException(inTemplate.GetType().ToString());
        }
예제 #4
0
        public void upgrade(OldTSpace.TypeRepTemplate inV, NewTSpace.TypeRepTemplate outV)
        {
            upgrade(inV as OldTSpace.TranslationBase, outV as NewTSpace.TranslationBase);

            outV.TypeName = inV.TypeName;

            outV.Uses = inV.NamespacePath;
        }
예제 #5
0
		public NewTSpace.TypeRepTemplate upgrade (OldTSpace.TypeRepTemplate inTemplate)
		{
			inProgress = inTemplate;
			
			OldTSpace.StructRepTemplate strukt = inTemplate as OldTSpace.StructRepTemplate;
			if (strukt != null) {
			    NewTSpace.StructRepTemplate res = new NewTSpace.StructRepTemplate();
				upgrade(strukt, res);
				return res;
			}
			OldTSpace.ClassRepTemplate klass = inTemplate as OldTSpace.ClassRepTemplate;
			if (klass != null) {
			    NewTSpace.ClassRepTemplate res = new NewTSpace.ClassRepTemplate();
				upgrade(klass, res);
				return res;
			}
			OldTSpace.InterfaceRepTemplate iface = inTemplate as OldTSpace.InterfaceRepTemplate;
			if (iface != null) {
			    NewTSpace.InterfaceRepTemplate res = new NewTSpace.InterfaceRepTemplate();
				upgrade(iface, res);
				return res;
			}

			throw new System.NotImplementedException(inTemplate.GetType().ToString());
		}