public void Start()
        {
            CheckDisposed();
            if (listening)
            {
                return;
            }

            EndPointManager.AddListener(this);
            listening = true;
        }
Exemple #2
0
 private void SetXmlRpcUriForAllNodes()
 {
     foreach (var node in _nodes)
     {
         string uri = (string)LookupNode(node.Name)[2];
         if (!uri.Equals(""))
         {
             node.XmlRpcUri = new Uri(EndPointManager.ReplaceHostnameByIp(uri));
         }
     }
 }
Exemple #3
0
 public MainVM(IRegionManager regionManager, EndPointManager endpointMgnr)
 {
     _regionManager = regionManager;
     EndpointMgnr = endpointMgnr;
     CmdNavigate = new DelegateCommand<object>(CmdNavigate_HandleExecute);
     CmdNavigateToEqMgnt = new DelegateCommand<object>(CmdNavigateToEqMgnt_HandleExecute);
     CmdNavigateToVirtModell = new DelegateCommand<object>(CmdNavigateToVirtModell_HandleExecute);
     CmdNavigateToLevelSetup = new DelegateCommand<object>(CmdNavigateToLevelSetup_HandleExecute);
     CmdNavigateToGameBoard = new DelegateCommand(CmdNavigateToGameBoard_HandleExecute);
     CmdNavigateToImgSetup = new DelegateCommand(CmdNavigateToImgSetup_HandleExecute);
 }
        public new void Add(string uriPrefix)
        {
            ListenerPrefix.CheckUri(uriPrefix);
            if (Contains(uriPrefix))
            {
                return;
            }

            base.Add(uriPrefix);
            if (_listener.IsListening)
            {
                EndPointManager.AddPrefix(uriPrefix, _listener);
            }
        }
        public void Add(string uriPrefix)
        {
            listener.CheckDisposed();
            ListenerPrefix.CheckUri(uriPrefix);
            if (prefixes.Contains(uriPrefix))
            {
                return;
            }

            prefixes.Add(uriPrefix);
            if (listener.IsListening)
            {
                EndPointManager.AddPrefix(uriPrefix, listener);
            }
        }
        public bool Remove(string uriPrefix)
        {
            listener.CheckDisposed();
            if (uriPrefix == null)
            {
                throw new ArgumentNullException("uriPrefix");
            }

            bool result = prefixes.Remove(uriPrefix);

            if (result && listener.IsListening)
            {
                EndPointManager.RemovePrefix(uriPrefix, listener);
            }

            return(result);
        }
Exemple #7
0
 public SnipeItApi()
 {
     ApiSettings         = new ApiSettings();
     ReqManager          = new RequestManagerRestSharp(ApiSettings);
     AssetManager        = new AssetEndpointManager <Asset>(ReqManager, "hardware");
     CompanyManager      = new EndPointManager <Company>(ReqManager, "companies");
     LocationManager     = new EndPointManager <Location>(ReqManager, "locations");
     AccessoryManager    = new EndPointManager <Accessory>(ReqManager, "accessories");
     ConsumableManager   = new EndPointManager <Consumable>(ReqManager, "consumables");
     ComponentManager    = new EndPointManager <Component>(ReqManager, "components");
     UserManager         = new UserEndpointManager(ReqManager, "users");
     StatusLabelManager  = new StatusLabelEndpointManager <StatusLabel>(ReqManager, "statuslabels");
     ModelManager        = new EndPointManager <Model>(ReqManager, "models");
     LicenseManager      = new EndPointManager <License>(ReqManager, "licenses");
     CategoryManager     = new EndPointManager <Category>(ReqManager, "categories");
     ManufacturerManager = new EndPointManager <Manufacturer>(ReqManager, "manufacturers");
     FieldSetManager     = new EndPointManager <FieldSet>(ReqManager, "fieldsets");
     SupplierManager     = new EndPointManager <Supplier>(ReqManager, "suppliers");
     DepreciationManager = new EndPointManager <Depreciation>(ReqManager, "depreciations");
     DepartmentManager   = new EndPointManager <Department>(ReqManager, "departments");
 }
Exemple #8
0
        private void CheckIfRemove()
        {
            if (_prefixes.Count > 0)
            {
                return;
            }

            var list = _unhandled;

            if (list != null && list.Count > 0)
            {
                return;
            }

            list = _all;
            if (list != null && list.Count > 0)
            {
                return;
            }

            EndPointManager.RemoveEndPoint(this, _endpoint);
        }
        private void CheckIfRemove()
        {
            if (prefixes.Count > 0)
            {
                return;
            }

            ArrayList list = unhandled;

            if (list != null && list.Count > 0)
            {
                return;
            }

            list = all;
            if (list != null && list.Count > 0)
            {
                return;
            }

            EndPointManager.RemoveEndPoint(this, endpoint);
        }
 private void Close(bool force)
 {
     CheckDisposed();
     EndPointManager.RemoveListener(this);
     Cleanup(force);
 }