示例#1
0
        internal static void AssignTranslaters(Loader loader)
        {
            if (loader.ArgumentsPackaged != null)
            {
                foreach (IArgument arg in loader.ArgumentsPackaged)
                {
                    arg.Translater = TranslaterFactoryType.GetTranslater(arg);
                }
            }

            if (loader.PackageRecordTypes != null)
            {
                foreach (IPackageRecord rec in loader.PackageRecordTypes)
                {
                    rec.Translater = TranslaterFactoryEntity.GetTranslater(rec);
                    foreach (IEntityAttribute attrib in rec.Attributes)
                    {
                        attrib.Translater = TranslaterFactoryType.GetTranslater(attrib);
                    }
                }
            }

            foreach (List <IEntity> entityList in new List <List <IEntity> >()
            {
                loader.Tables, loader.Views, loader.ObjectTypes
            })
            {
                if (entityList == null)
                {
                    continue;
                }
                foreach (IEntity entity in entityList)
                {
                    entity.Translater = TranslaterFactoryEntity.GetTranslater(entity);
                    foreach (IEntityAttribute attrib in entity.Attributes)
                    {
                        attrib.Translater = TranslaterFactoryType.GetTranslater(attrib);
                    }
                }
            }
        }
示例#2
0
 internal static void Initialize(IParameterTranslation param)
 {
     TranslaterFactoryType.Initialize(param);
     TranslaterFactoryEntity.Initialize();
 }