Logo white

Tuo Wenbo / WeiQ_Mianfang

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • WeiQ_Mianfang
  • OS.Spin
  • OS.Spin.Modle
  • BusinessLayer
  • MGateWidth.cs
  • 20211021 ...
    8ca6e89d
    最新版本
    Tuo Wenbo authored
    2021-10-21 14:41:50 +0800  
    Browse Code »
MGateWidth.cs 415 Bytes
Edit Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
using System.Collections.Generic;
using System.Linq;

namespace OS.Spin.Modle.BusinessLayer
{
    public class MGateWidth
    {
        private Dictionary<int, int> _gates = new Dictionary<int, int>();

        public void SetGateWidthById(int id,int width)
        {
            _gates[id] = width;
        }

        public int GetSumWidth()
        {
            return _gates.Values.Sum();
        }
    }
}