예제 #1
0
        public BAM_HardwareAssetServices(BAM_ApiClient bamclient)
        {
            _bamclient = bamclient;
            if (_bamclient == null)
            {
                _bamclient = new BAM_ApiClient();
                Task.Run(() => _bamclient.Setup()).Wait();
            }
            _assetStatusService = new BAM_AssetStatusService(_bamclient);
            _userService        = new BAM_UserService(_bamclient);
            _costCenterService  = new BAM_CostCenterService(_bamclient);

            var jsonNameRelationships = JSON_FileExport.ReadFile("NameRelationships.json", "JsonStatics");

            _bamApiRelationships = JsonConvert.DeserializeObject <List <NameRelationship> >(jsonNameRelationships);
        }