internal override void Invoke() { this.m_client = ExternalClientFactory.ConstructControlServiceClient(ExternalLib.Endpoint.ControlEndpointName, ExternalLib.Endpoint.ExternalUserName, ExternalLib.Endpoint.ExternalUserPassword); this._rqstToken = this.m_client.ServiceClient.ActivateCriticalPeakPricingByMeters(_epRequest); Thread.Sleep(300000); this.m_client.ServiceClient.Close(); }
internal override void Invoke() { if (string.IsNullOrEmpty(UniqueID)) { this._client = ExternalClientFactory.ConstructControlServiceClient(ExternalLib.Endpoint.ControlEndpointName, ExternalLib.Endpoint.ExternalUserName, ExternalLib.Endpoint.ExternalUserPassword); this._rqstToken = this._client.ServiceClient.DownloadConfigurationByGroup(_requestDownloadConfig); this._client.ServiceClient.Close(); _uniqueID = _rqstToken.Id.ToString(); } }
internal override void Invoke() { this._client = ExternalClientFactory.ConstructControlServiceClient(ExternalLib.Endpoint.ControlEndpointName, ExternalLib.Endpoint.ExternalUserName, ExternalLib.Endpoint.ExternalUserPassword); RequestToken Token = new RequestToken(); Token.Id = new Guid(_uniqueID); this._result = this._client.ServiceClient.GetDownloadConfigurationByGroupResult(Token); this._client.ServiceClient.Close(); }
internal override void Invoke() { if (string.IsNullOrEmpty(UniqueID)) { this._client = ExternalClientFactory.ConstructControlServiceClient(ExternalLib.Endpoint.ControlEndpointName, ExternalLib.Endpoint.ExternalUserName, ExternalLib.Endpoint.ExternalUserPassword); this._rqstToken = this._client.ServiceClient.PingByEndpoints(_requestPing); bool blTryAgain = true; int retryCount = 4; _uniqueID = _rqstToken.Id.ToString(); while (blTryAgain) { if (retryCount == 0) { blTryAgain = false; } try { Thread.Sleep(60000); this._rqstResult = this._client.ServiceClient.GetPingByEndpointsResult(this._rqstToken); if (this._rqstResult != null) { blTryAgain = false; } } catch (Exception e) { Console.WriteLine("Exception from DisconnectMeter: " + e); retryCount--; } if (this._rqstResult == null) { retReslt = "Unknown"; } else { retReslt = this._rqstResult.Result.ToString(); } } this._client.ServiceClient.Close(); } }