public TestHelper Sign_job(SignerIdentifier signerIdentifier) { Assert_state(_jobResponse); var identifierValue = signerIdentifier.IsPersonalIdentificationNumber() ? ((PersonalIdentificationNumber)signerIdentifier).Value : ((CustomIdentifier)signerIdentifier).Value; var statusUrl = _directClient.AutoSign(_jobResponse.JobId, identifierValue).Result; try { var queryParams = new Uri(statusUrl).Query; var queryDictionary = HttpUtility.ParseQueryString(queryParams); var statusQueryToken = queryDictionary.Get(0); var jobStatus = _jobResponse.StatusUrl; if (jobStatus != null && jobStatus.HasValue()) { _statusReference = MorphStatusReferenceIfMayBe(jobStatus.Status(statusQueryToken)); } return(this); } catch (Exception) { throw new InvalidOperationException("Unable to auto-sign. This is probably a result of the backend not supporting the kind of job you are trying to sign."); } }
void Start() { flag = false; Base = GameObject.Find("拠点").transform.GetChild(0).GetChild(0).GetComponent <StatusReference>(); // statusReference = Base StartCoroutine(coroutine()); }
void Start() { HP = 1; one = false; request = GameObject.Find("JsonObject").GetComponent <JsonRequest>(); BaseObject = GameObject.Find("拠点"); statusReference = BaseObject.transform.GetChild(0).GetChild(0).GetComponent <StatusReference>(); // statusReference = Base StartCoroutine(UpdateStatus()); }
public void Simple_constructor() { //Arrange var urlWithoutToken = new Uri("http://organizationdomain.com/completionUrl/"); var statusQueryToken = "ALongToken"; //Act var statusReference = new StatusReference(urlWithoutToken, statusQueryToken); //Assert Assert.Equal(urlWithoutToken, statusReference.BaseUrl); Assert.Equal(statusQueryToken, statusReference.StatusQueryToken); }
public Customer(Customer customer) : base(customer) { Id = customer.Id; Account = customer.Account; Sla = customer.Sla; Date_Visited = customer.Date_Visited; Email = customer.Email; User_Name = customer.User_Name; First_Name = customer.First_Name; Tou = customer.Tou; Password = customer.Password; Password_Confirm = customer.Password_Confirm; Status = customer.Status; Customer_Role = customer.Customer_Role; }
private static StatusReference MorphStatusReferenceIfMayBe(StatusReference statusReference) { var statusReferenceUri = TransformReferenceToCorrectEnvironment(statusReference.Url()); return(new StatusReference(new Uri(statusReferenceUri.GetLeftPart(UriPartial.Path)), statusReference.StatusQueryToken)); }