コード例 #1
0
 public ReportsController(EntityCore context, IMapper mapper, IMemoryCache memoryCache, IKendoGrid kendoGrid)
 {
     _context   = context;
     _mapper    = mapper;
     _cache     = memoryCache;
     _kendoGrid = kendoGrid;
 }
コード例 #2
0
 public SalesInvoiceController(EntityCore context, IMapper mapper, IMemoryCache memoryCache, ILoggerFactory loggerFactory)
 {
     _context = context;
     _mapper  = mapper;
     _cache   = memoryCache;
     _logger  = loggerFactory.CreateLogger <SalesInvoiceController>();
 }
コード例 #3
0
 public CustomerController(EntityCore context, IMapper mapper, IMemoryCache memoryCache, IKendoGrid kendoGrid, ILoggerFactory loggerFactory)
 {
     _context   = context;
     _mapper    = mapper;
     _cache     = memoryCache;
     _kendoGrid = kendoGrid;
     _logger    = loggerFactory.CreateLogger <CustomerController>();
 }
コード例 #4
0
 public SettingsController(EntityCore context, IConfiguration configuration, IMapper mapper, UserManager <IdentityUser> userManager, RoleManager <IdentityRole> roleManager, IMemoryCache memoryCache, ILoggerFactory loggerFactory)
 {
     _userManager  = userManager;
     _roleManager  = roleManager;
     _context      = context;
     _mapper       = mapper;
     _cache        = memoryCache;
     Configuration = configuration;
     _logger       = loggerFactory.CreateLogger <SettingsController>();
 }
コード例 #5
0
        public static EntityCore ToEntityCore(this Entity entity)
        {
            var dynamicsEntity = new EntityCore(entity.LogicalName, entity.Id);

            foreach (var attribute in entity.Attributes)
            {
                dynamicsEntity.Attributes.Add(attribute.Key, ConvertAttributeValue(attribute));
            }

            return(dynamicsEntity);
        }
コード例 #6
0
        public AccountController(
            UserManager <IdentityUser> userManager,
            SignInManager <IdentityUser> signInManager,
            RoleManager <IdentityRole> roleManager,
            ILoggerFactory loggerFactory,

            EntityCore context)
        {
            _userManager   = userManager;
            _signInManager = signInManager;
            _roleManager   = roleManager;
            _context       = context;
            _logger        = loggerFactory.CreateLogger <AccountController>();
        }
コード例 #7
0
        public void setContext()
        {
            Config config = ConfigJSON.Read();

            if (!string.IsNullOrEmpty(config.Environment))
            {
                var con = Configuration.GetConnectionString(config.Environment + "Connection");
                if (con != _context.Database.GetDbConnection().ConnectionString)
                {
                    var options = new DbContextOptionsBuilder <EntityCore>();
                    options.UseSqlServer(con);
                    _context = new EntityCore(options.Options);
                }
            }
        }
コード例 #8
0
        private EntityCore GetByType(object src)
        {
            EntityCore res = new EntityCore();

            if (src.GetType() == typeof(LeadViewModel))
            {
                res = src.Adapt <Lead>(config);
            }

            if (src.GetType() == typeof(ContactViewModel))
            {
                res = src.Adapt <Contact>(config);
            }

            return(res);
        }
コード例 #9
0
        /// <summary>
        /// 执行查询分页
        /// </summary>
        public void GetPageList()
        {
            if (_pageindex < 1)
            {
                _pageindex = 1;
            }

            #region 排序

            if (string.IsNullOrEmpty(_orderstring.Trim()))
            {
                if (_ordercolumn.Length != _ordertype.Length || _ordercolumn.Length < 1)
                {
                    throw new Exception("分页排序出错");
                }

                ArrayList OrderOutput = new ArrayList();
                for (int u = 0; u < _ordercolumn.Length; u++)
                {
                    OrderOutput.Add(_ordercolumn[u].ToString() + " " + _ordertype[u].ToString());
                }
                _orderstring = String.Join(",", (string[])OrderOutput.ToArray(typeof(string)));
            }

            #endregion

            ArrayList _ArrayList = EntityCore <table> .GetPageList(_pagesize, _pageindex, _sqlwhere, _sqlparms, _orderstring, _columns);

            if (_ArrayList.Count == 5)
            {
                _datalist    = (List <table>)_ArrayList[0];
                _dataset     = (DataSet)_ArrayList[1];
                _recordcount = int.Parse(_ArrayList[2].ToString());
                _pagecount   = int.Parse(_ArrayList[3].ToString());
                _pageindex   = int.Parse(_ArrayList[4].ToString());
            }
            else
            {
                throw new Exception("分页出错");
            }
        }
コード例 #10
0
 public CreditNoteController(EntityCore context, IMapper mapper, ILoggerFactory loggerFactory)
 {
     _mapper  = mapper;
     _context = context;
     _logger  = loggerFactory.CreateLogger <CreditInvoiceController>();
 }
コード例 #11
0
 private void Start()
 {
     m_Core = GetComponent <EntityCore>();
 }
コード例 #12
0
ファイル: Round.cs プロジェクト: yjd6808/NoAssetSpaceShooter
 public void AddEntity(EntityCore core) => m_EntityPool.Add(core);
コード例 #13
0
 public ItemTypeController(EntityCore context)
 {
     _context = context;
 }
コード例 #14
0
 public ItemGroupController(EntityCore context)
 {
     _context = context;
 }
コード例 #15
0
        //public BaseController()
        //{

        //}
        public BaseController(EntityCore Context, IConfiguration configuration)
        {
            Configuration = configuration;
            _context      = Context;
            setContext();
        }
コード例 #16
0
 // private readonly ILogger _logger;
 public NavPostData(EntityCore context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
     //_logger = logger;
 }
コード例 #17
0
 public ItemController(EntityCore context, IMemoryCache memoryCache, IKendoGrid kendoGrid)
 {
     _context   = context;
     _cache     = memoryCache;
     _kendoGrid = kendoGrid;
 }
コード例 #18
0
    public GameObject SpawnBullet(EntityBulletType type, Vector3 position, Quaternion rotation, EntityCore core, float speed, int damage, Vector3 defaultDirection, AllyFlag allyFlag, bool selfControlled = false, Vector3 noramalizedDirection = default)
    {
        Rect bottomRectangle = new Rect(new Vector2(-15.0f, -15.0f), new Vector2(90.0f, 13.0f));
        Rect topRectangle    = new Rect(new Vector2(-15.0f, 102.0f), new Vector2(90.0f, 13.0f));
        Rect leftRectangle   = new Rect(new Vector2(-15.0f, -15.0f), new Vector2(13.0f, 130.0f));
        Rect rightRectangle  = new Rect(new Vector2(62.0f, -15.0f), new Vector2(13.0f, 130.0f));

        if (bottomRectangle.Contains(position))
        {
            return(null);
        }

        if (topRectangle.Contains(position))
        {
            return(null);
        }

        if (leftRectangle.Contains(position))
        {
            return(null);
        }

        if (rightRectangle.Contains(position))
        {
            return(null);
        }

        GameObject bulletPrefab = GetEnemyBulletPrefabObject(type);

        if (bulletPrefab == null)
        {
            throw new Exception(type.ToString() + "의 불렛프리팹을 가져오는데 실패했습니다");
        }

        GameObject gameObject = Instantiate(bulletPrefab, position, rotation);

        switch (allyFlag)
        {
        case AllyFlag.Player:
            gameObject.SetTagIncludeAllChildren("PlayerBullet");
            break;

        case AllyFlag.Enemy:
            gameObject.SetTagIncludeAllChildren("EnemyBullet");
            break;
        }

        EntityBulletInfo comp = gameObject.AddComponent <EntityBulletInfo>();

        comp.SetSpeed(speed);
        comp.SetSelfControlled(selfControlled);
        comp.SetDamage(damage);
        comp.SetEntityCore(core);
        comp.SetDirection(noramalizedDirection);
        comp.SetDefaultDirection(defaultDirection);
        gameObject.GetComponent <EntityBulletMovementController>().SetEntityBulletInfo(comp);
        return(gameObject);
    }
コード例 #19
0
ファイル: Round.cs プロジェクト: yjd6808/NoAssetSpaceShooter
 public void AddTargetedEntity(EntityCore core) => m_TargetedEntityPool.Add(default(String), core);
コード例 #20
0
 public void SetEntityCore(EntityCore entityCore) => m_EntityCore = entityCore;
コード例 #21
0
 public DenominationController(EntityCore context)
 {
     _context = context;
 }
コード例 #22
0
 public ApiController(EntityCore context, IMapper mapper, IMemoryCache memoryCache)
 {
     _context = context;
     _mapper  = mapper;
     _cache   = memoryCache;
 }
コード例 #23
0
 public CreditInvoiceController(EntityCore context)
 {
     _context = context;
 }
コード例 #24
0
 public SettlementController(EntityCore context)
 {
     _context = context;
 }
コード例 #25
0
 public ItemCategoryController(EntityCore context)
 {
     _context = context;
 }
コード例 #26
0
ファイル: Round.cs プロジェクト: yjd6808/NoAssetSpaceShooter
 public void RemoveEntity(EntityCore core) => m_EntityPool.Remove(core);
コード例 #27
0
 public PrintController(EntityCore context, IMapper mapper)
 {
     _context = context;
 }
コード例 #28
0
 public TerminalController(EntityCore context)
 {
     _context = context;
 }
コード例 #29
0
 public StoreController(EntityCore context)
 {
     _context = context;
 }
コード例 #30
0
ファイル: Round.cs プロジェクト: yjd6808/NoAssetSpaceShooter
 public void AddTargetedEntity(String key, EntityCore core) => m_TargetedEntityPool.Add(key, core);