public bool DatabaseServiceTest(string url)
        {
            StatusServiceClient client = StatusServiceClientCreator(url);
            bool result = client.DatabaseServiceTest();

            return(result);
        }
        public bool FileSystemServiceTest(string url)
        {
            StatusServiceClient client = StatusServiceClientCreator(url);
            bool result = client.FileSystemServiceTest();

            return(result);
        }
        public string BasicServiceTest(string url)
        {
            StatusServiceClient client = StatusServiceClientCreator(url);
            string result = client.BasicServiceTest();

            return(result);
        }
        public StatusRequestResult GetServiceStatus(string url, string token, EncryptionInfo encryptionInfo)
        {
            StatusServiceClient client = StatusServiceClientCreator(url);

            string encryptedToken = _symmetricEncryptionProvider.Encrypt(token, encryptionInfo);
            string serviceResult  = client.GetServiceStatus(encryptedToken);
            string result         = _symmetricEncryptionProvider.Decrypt(serviceResult, encryptionInfo);

            StatusRequestResult statusRequestResult = _objectSerializationProvider.Deserialize <StatusRequestResult>(result);

            return(statusRequestResult);
        }
        public QueryActiveServiceProductsResult GetActiveServiceProducts(string url, string token, EncryptionInfo encryptionInfo, KeyPair serviceKeys)
        {
            StatusServiceClient client = StatusServiceClientCreator(url);

            string encryptedToken = _symmetricEncryptionProvider.Encrypt(token, encryptionInfo);

            string encryptedResult = client.QueryActiveProductsAndLiceseSets(encryptedToken);
            string decryptedResult = _asymmetricEncryptionProvider.DecryptPublic(encryptedResult, serviceKeys);

            QueryActiveServiceProductsResult result = _objectSerializationProvider.Deserialize <QueryActiveServiceProductsResult>(decryptedResult);

            return(result);
        }
        public SetupTestProductResult CleanUpTestProductData(string url, string token, EncryptionInfo encryptionInfo)
        {
            StatusServiceClient client = StatusServiceClientCreator(url);

            string encryptedToken = _symmetricEncryptionProvider.Encrypt(token, encryptionInfo);

            string result          = client.CleanTestProductData(encryptedToken);
            string decryptedResult = _symmetricEncryptionProvider.Decrypt(result, encryptionInfo);

            SetupTestProductResult setupTestProductResult = _objectSerializationProvider.Deserialize <SetupTestProductResult>(decryptedResult);

            return(setupTestProductResult);
        }
        public InitializationResult InitializeService(string url, string token, MasterServiceData data, EncryptionInfo encryptionInfo)
        {
            StatusServiceClient client = StatusServiceClientCreator(url);

            string encryptedToken = _symmetricEncryptionProvider.Encrypt(token, encryptionInfo);
            string serializedData = _objectSerializationProvider.Serialize(data);
            string encryptedData  = _symmetricEncryptionProvider.Encrypt(serializedData, encryptionInfo);

            string result          = client.InitializeService(encryptedToken, encryptedData);
            string decryptedResult = _symmetricEncryptionProvider.Decrypt(result, encryptionInfo);

            InitializationResult initializationResult = _objectSerializationProvider.Deserialize <InitializationResult>(decryptedResult);

            return(initializationResult);
        }
示例#8
0
 private void Form1_Load(object sender, EventArgs e)
 {
     Random rnd = new Random();
     try
     {
         string name = rnd.Next(3).ToString();
         this.Text = name;
         client =
          new StatusServiceClient(new InstanceContext(this));
         client.Subscribe(name);
     }
     catch (Exception ex)
     {
         listBox1.Items.Add(ex.ToString());
     }
 }
示例#9
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Random rnd = new Random();

            try
            {
                string name = rnd.Next(3).ToString();
                this.Text = name;
                client    =
                    new StatusServiceClient(new InstanceContext(this));
                client.Subscribe(name);
            }
            catch (Exception ex)
            {
                listBox1.Items.Add(ex.ToString());
            }
        }