void UpdateDisplay(SecretData secret, DiscoveryData discoveryData) { if (secret == this.secret) { CheckDisplayUnlock(); } }
void NewDiscovery(DiscoveryData data) { DiscoveryEntity discovery = Instantiate(discoveryEntityPrefab, discoveryContainer.transform); discovery.discoveryData = data; discovery.OnPickup += RemoveDiscovery; discovery.OnDrop += DropDiscovery; }
public ActionResult Callback(DiscoveryData discoveryData) { var serializedModel = Encoding.Unicode.GetString(Convert.FromBase64String(HttpUtility.UrlDecode(discoveryData.html_encoded_json_disocvery_data))); //here's the model object to work with var model = JsonConvert.DeserializeObject <List <Models.DiscoveryModel> >(serializedModel); return(Content(serializedModel)); }
private void Update() { if (!_displayingMessage) { if (_queuedSecrets.Count > 0) { _displayingMessage = true; DiscoveryData discovery = _queuedSecrets.Dequeue(); Debug.Log("Displaying discovery: " + discovery.name); regularText.text = codedText.text = discovery.name; _animator.SetBool("ShowingMessage", true); } } }
/// <summary> /// Gets the discovery data asynchronous. /// </summary> /// <returns></returns> /// <exception cref="System.Exception">GetDiscoveryData</exception> public async Task <DiscoveryData> GetDiscoveryDataAsync() { try { //call Discovery endpoint HttpWebRequest discoveryRequest = BuildDiscoveryRequest(); WebResponse discoveryResponce = await discoveryRequest.GetResponseAsync(); using (HttpWebResponse response = (HttpWebResponse)discoveryResponce) { using (var tokenReader = new StreamReader(response.GetResponseStream())) { string responseText = await tokenReader.ReadToEndAsync(); DiscoveryData data = JsonConvert.DeserializeObject <DiscoveryData>(responseText); if (data != null) { //Authorization endpoint url authorizationEndpoint = data.AuthorizationEndpoint; //Token endpoint url tokenEndpoint = data.TokenEndpoint; //UseInfo endpoint url userinfoEndPoint = data.UserinfoEndpoint; //Revoke endpoint url revokeEndpoint = data.RevocationEndpoint; //Issuer endpoint Url issuerUrl = data.Issuer; //Json Web Key Store Url jwksEndpoint = data.JWKSUri; return(data); } else { throw new Exception("GetDiscoveryData"); } } } } catch (Exception exception) { throw exception; } }
void SecretClicked(SecretData secret) { _selectedSecret = secret; selectedSecretText.enabled = true; selectedSecretText.text = secret.name; DiscoveryData assignedDiscovery = Director.GetManager <SecretsManager>().GetAssignedDiscovery(secret); if (assignedDiscovery == null) { assignedDiscoveryText.text = "No assigned discovery"; } else { assignedDiscoveryText.text = assignedDiscovery.name; } }
void EnqueueDiscovery(DiscoveryData discovery) { _queuedSecrets.Enqueue(discovery); }
public bool IsDataUnlocked(DiscoveryData data) { return(lockedDiscoveries.Contains(data)); }
public void AssignDiscoveryToData(SecretData secret, DiscoveryData discovery) { matches[secret] = discovery; OnDiscoveryAssigned(secret, discovery); }