Exemplo n.º 1
0
        public static void Load(IObjectMapInfoCache cache)
        {
            cache.ThrowIfNullArgument(nameof(cache));

            DirectoryInfo dir   = new DirectoryInfo(Runtime.StartupDirectory);
            var           files = dir.EnumerateFiles("*", SearchOption.TopDirectoryOnly);

            foreach (var file in files)
            {
                if (file.Extension == ClrClassPath.DLL || file.Extension == ClrClassPath.EXE)
                {
                    try
                    {
                        AttributeMapLoader loader = new AttributeMapLoader(cache, Runtime.GetPath(file.Name));
                        loader.Load();
                    }
                    catch (BadImageFormatException)
                    {
                    }
                }
            }

            string[] paths = ORMConfig.ORMConfiguration.GetObjectMapPaths();
            foreach (string path in paths)
            {
                XmlMapLoader loader = new XmlMapLoader(cache, path);
                loader.Load();
            }
        }
Exemplo n.º 2
0
        public static void Load(IObjectMapInfoCache cache)
        {
            cache.ThrowIfNullArgument(nameof(cache));

            DirectoryInfo dir = new DirectoryInfo(Runtime.StartupDirectory);
            var files = dir.EnumerateFiles("*", SearchOption.TopDirectoryOnly);
            foreach (var file in files)
            {
                if (file.Extension == ClrClassPath.DLL || file.Extension == ClrClassPath.EXE)
                {
                    try
                    {
                        AttributeMapLoader loader = new AttributeMapLoader(cache, Runtime.GetPath(file.Name));
                        loader.Load();
                    }
                    catch (BadImageFormatException)
                    {
                    }
                }
            }

            string[] paths = ORMConfig.ORMConfiguration.GetObjectMapPaths();
            foreach (string path in paths)
            {
                XmlMapLoader loader = new XmlMapLoader(cache, path);
                loader.Load();
            }
        }
 protected AbstractFilterExpressionVisitor(ISQLTranslator tr, IObjectMapInfoCache cache)
 {
     tr.ThrowIfNullArgument(nameof(tr));
     cache.ThrowIfNullArgument(nameof(cache));
     _tr    = tr;
     _cache = cache;
 }
Exemplo n.º 4
0
        public AttributeMapLoader(IObjectMapInfoCache cache, string file)
        {
            cache.ThrowIfNullArgument(nameof(cache));
            file.ThrowIfNullArgument(nameof(file));

            _cache = cache;
            _file  = file;
        }
Exemplo n.º 5
0
        public AttributeMapLoader(IObjectMapInfoCache cache, string file)
        {
            cache.ThrowIfNullArgument(nameof(cache));
            file.ThrowIfNullArgument(nameof(file));

            _cache = cache;
            _file = file;
        }
Exemplo n.º 6
0
        protected AbstractQueryColumnBuilder(ISQLTranslator tr, IObjectMapInfoCache cache)
        {
            cache.ThrowIfNullArgument(nameof(cache));
            tr.ThrowIfNullArgument(nameof(tr));

            _tr    = tr;
            _cache = cache;
            _str   = new StringBuilder();
        }
Exemplo n.º 7
0
        protected AbstractQueryColumnBuilder(ISQLTranslator tr, IObjectMapInfoCache cache)
        {
            cache.ThrowIfNullArgument(nameof(cache));
            tr.ThrowIfNullArgument(nameof(tr));

            _tr = tr;
            _cache = cache;
            _str = new StringBuilder();
        }
Exemplo n.º 8
0
        protected AbstractQueryViewVisitor(ISQLTranslator tr, IJoinExpressionVisitor jv, IObjectMapInfoCache cache)
        {
            tr.ThrowIfNullArgument(nameof(tr));
            jv.ThrowIfNullArgument(nameof(jv));
            cache.ThrowIfNullArgument(nameof(cache));

            _cache = cache;
            _tr = tr;
            _jv = jv;
        }
Exemplo n.º 9
0
        protected AbstractQueryViewVisitor(ISQLTranslator tr, IJoinExpressionVisitor jv, IObjectMapInfoCache cache)
        {
            tr.ThrowIfNullArgument(nameof(tr));
            jv.ThrowIfNullArgument(nameof(jv));
            cache.ThrowIfNullArgument(nameof(cache));

            _cache = cache;
            _tr    = tr;
            _jv    = jv;
        }
Exemplo n.º 10
0
 protected AbstractModelSQLEmit(IObjectMapInfoCache cache, ISQLTranslator tr, ITypeMap tm, IModelColumnsBuilder cb)
 {
     tr.ThrowIfNullArgument(nameof(tr));
     tm.ThrowIfNullArgument(nameof(tm));
     cb.ThrowIfNullArgument(nameof(cb));
     cache.ThrowIfNullArgument(nameof(cache));
     this._tr    = tr;
     this._tm    = tm;
     this._cb    = cb;
     this._cache = cache;
 }
Exemplo n.º 11
0
        public XmlMapLoader(IObjectMapInfoCache cache, string file)
        {
            cache.ThrowIfNullArgument(nameof(cache));
            file.ThrowIfNullArgument(nameof(file));

            _cache = cache;
            _file  = file;

            _clrDict = new Dictionary <string, ClrClassPath>();
            _dbDict  = new Dictionary <string, DbPath>();
        }
Exemplo n.º 12
0
        public XmlMapLoader(IObjectMapInfoCache cache, string file)
        {
            cache.ThrowIfNullArgument(nameof(cache));
            file.ThrowIfNullArgument(nameof(file));

            _cache = cache;
            _file = file;

            _clrDict = new Dictionary<string, ClrClassPath>();
            _dbDict = new Dictionary<string, DbPath>();
        }
Exemplo n.º 13
0
        protected AbstractMappingSQLEmit(IObjectMapInfoCache cache, IMappingColumnsBuilder cb, ISQLTranslator tr, IMappingConditionExpressionVisitor cv, IMappingOrderExpressionVisitor ov)
        {
            cache.ThrowIfNullArgument(nameof(cache));
            cb.ThrowIfNullArgument(nameof(cb));
            tr.ThrowIfNullArgument(nameof(tr));
            cv.ThrowIfNullArgument(nameof(cv));
            ov.ThrowIfNullArgument(nameof(ov));

            _cache = cache;
            _cb    = cb;
            _tr    = tr;
            _cv    = cv;
            _ov    = ov;
        }
Exemplo n.º 14
0
        public AbstractQuerySQLEmit(IObjectMapInfoCache cache, ISQLTranslator tr, IQueryViewVisitor vv, IQueryColumnBuilder cb, IQueryCriteriaVisitor cv, IQueryOrderVisitor ov)
        {
            cache.ThrowIfNullArgument(nameof(cache));
            tr.ThrowIfNullArgument(nameof(tr));
            vv.ThrowIfNullArgument(nameof(vv));
            cb.ThrowIfNullArgument(nameof(cb));
            cv.ThrowIfNullArgument(nameof(cv));
            ov.ThrowIfNullArgument(nameof(ov));

            _cache = cache;
            _tr = tr;
            _vv = vv;
            _cb = cb;
            _cv = cv;
            _ov = ov;
        }
Exemplo n.º 15
0
        public AbstractQuerySQLEmit(IObjectMapInfoCache cache, ISQLTranslator tr, IQueryViewVisitor vv, IQueryColumnBuilder cb, IQueryCriteriaVisitor cv, IQueryOrderVisitor ov)
        {
            cache.ThrowIfNullArgument(nameof(cache));
            tr.ThrowIfNullArgument(nameof(tr));
            vv.ThrowIfNullArgument(nameof(vv));
            cb.ThrowIfNullArgument(nameof(cb));
            cv.ThrowIfNullArgument(nameof(cv));
            ov.ThrowIfNullArgument(nameof(ov));

            _cache = cache;
            _tr    = tr;
            _vv    = vv;
            _cb    = cb;
            _cv    = cv;
            _ov    = ov;
        }