//Automation Constructor public AttributesController(IAttributesManager IAttributesManager, HttpRequestMessage Request, HttpRequestContext RequestContext) { parameters = new Dictionary<string, string>(); this.RequestContext = RequestContext; this.Request = Request; this.AttributesManager = IAttributesManager; }
public IHttpActionResult GetAttributes() { CodebookResponse _responseEnvelope = new CodebookResponse(Request.Properties["requestId"].ToString(), true); String apiUser = RequestContext.Principal.Identity.Name; AutomationManager.AttributeObjectToAttributeApiObject(AutomationManager.attributes); AttributesManager = new AttributesManager(AutomationManager.IAttributeRepository.Object); var result = new AttributesController(AttributesManager, this.Request, this.RequestContext).GetAttributes() as OkNegotiatedContentResult<CodebookResponse>; return Ok(result.Content); }
public AttributesController initAttributesController(IAttributesManager IAttributesManager) { AttributesController controller = new AttributesController(IAttributesManager); controller.Request = this.request; controller.Request.Properties[HttpPropertyKeys.HttpConfigurationKey] = this.config; controller.Request.Properties["requestId"] = new Guid().ToString(); controller.RequestContext.RouteData = this.routeData; return controller; }
void OnTriggerEnter2D(Collider2D other) { if(other.gameObject.tag == "Player") { player = other.GetComponent<Player>(); } attributes = Interface.Find<IAttributesManager>(other.gameObject); if (attributes != null) { AssignMessage(); Time.timeScale = 0.0f; IMessageDelegate messageDelegate = Interface.Find<IMessageDelegate>(FindObjectOfType<Dialogue>().gameObject); if (messageDelegate != null) { if (NPCTeleportTo == NPCTo.NoWhere) messageDelegate.ShowMessageWithOk(message, okButton, OnClickOK); else if (NPCTeleportTo == NPCTo.World && Skeleton.numberOfTutorialSkeletons > 0) messageDelegate.ShowMessageWithOk(message, okButton); else messageDelegate.ShowMessageWithOkCancel(message, okButton, cancelButton, OnClickOK); GetComponent<Collider2D>().enabled = false; StartCoroutine(DelayThenEnableCollider()); } else { Debug.LogError("Dialogue could not be found."); } } }
void OnTriggerEnter2D(Collider2D other) { attributes = Interface.Find<IAttributesManager>(other.gameObject); //Debug.Log("Number of Tutorial skeletons" + Skeleton.numberOfTutorialSkeletons); if (attributes != null && Skeleton.numberOfTutorialSkeletons <= 0) { Time.timeScale = 0.0f; switch (NPCTeleportTo) { case NPCTo.Tutorial: GameInfo.AreaToTeleportTo = GameInfo.Area.TutorialArea; break; case NPCTo.World: GameInfo.AreaToTeleportTo = GameInfo.Area.World; break; case NPCTo.Forest: GameInfo.AreaToTeleportTo = GameInfo.Area.Forest; break; case NPCTo.Castle: GameInfo.AreaToTeleportTo = GameInfo.Area.Castle; break; case NPCTo.MainMenu: GameInfo.AreaToTeleportTo = GameInfo.Area.MainMenu; break; case NPCTo.NoWhere: break; } IMessageDelegate messageDelegate = Interface.Find<IMessageDelegate>(interfaceSupplierForMessageDelagate); if (messageDelegate != null) { messageDelegate.ShowMessageWithOkCancel(DialogMessage, okButton, cancelButton, OnClickOK); } } }
//Xunit Constructor public AttributesController(IAttributesManager IAttributesManager) { parameters = new Dictionary<string, string>(); this.AttributesManager = IAttributesManager; }