コード例 #1
0
        public static void RegisterAssemblyForData(Assembly ass)
        {
            if (_dataRecordTypes == null)
            {
                _dataRecordTypes = new List <DataRecordTypeAssembly>();
            }
            foreach (Type t in ass.GetTypes())
            {
                DataRecordTypeAssembly newRec = new DataRecordTypeAssembly();
                newRec.DataRecordType = t;
                newRec.Assembly       = ass;
                if (t.BaseType.BaseType != null && t.BaseType != null && t.BaseType.BaseType.FullName == typeof(DataRecord).FullName && !_dataRecordTypes.Contains(newRec))
                {
                    _dataRecordTypes.Add(newRec);
                }
            }

            GetEnvironments();
        }
コード例 #2
0
        public static void RegisterAssemblyForData(Assembly ass)
        {
            if(_dataRecordTypes == null) { _dataRecordTypes = new List<DataRecordTypeAssembly>(); }
            foreach(Type t in ass.GetTypes())
            {
                DataRecordTypeAssembly newRec = new DataRecordTypeAssembly();
                newRec.DataRecordType = t;
                newRec.Assembly = ass;
                if(t.BaseType.BaseType != null && t.BaseType != null && t.BaseType.BaseType.FullName == typeof(DataRecord).FullName && !_dataRecordTypes.Contains(newRec))
                {
                    _dataRecordTypes.Add(newRec);
                }
            }

            GetEnvironments();
        }