public void OnCancelled(DatabaseError error) { Raised?.Invoke(this, new FirebaseEventArgs() { error = error }); }
/// <summary> /// /// </summary> /// <param name="context"></param> /// <returns></returns> public Task <T> Raise(T context) { var taskCompletionSource = new TaskCompletionSource <T>(); Raised?.Invoke(this, new InteractionRequestedEventArgs(context, () => taskCompletionSource.SetResult(context))); return(taskCompletionSource.Task); }
public void OnDataChange(DataSnapshot snapshot) { Raised?.Invoke(this, new FirebaseEventArgs() { snapshot = snapshot }); }
private void _apiClient_OnLastTimeBar(object sender, TimeBarArgs e) { if (_isStarted) { Raised?.Invoke(this, EventArgs.Empty); } }
public void OnComplete(DatabaseError error, DatabaseReference @ref) { Raised?.Invoke(this, new FirebaseEventArgs() { error = error, @ref = @ref }); }
public void OnComplete(Android.Gms.Tasks.Task task) { Raised?.Invoke(this, new FirebaseEventArgs() { task = task }); }
public void Raise <T>(T context, Action <T> callback) where T : IInteraction { HandleInteraction(context); callback(context); Raised?.Invoke(this, new InteractionRequestEventArgs(context, () => { })); }
private void Awake() { //get a reference to the Raised script raised = GetComponent <Raised>(); //create the axis float axisLength = radius * Mathf.Sqrt(3); axisOne = new Vector3(0, 0, axisLength); axisTwo = new Vector3(axisLength * Mathf.Sqrt(3) / 2, 0, -axisLength / 2); grid = new Dictionary <Vector2, Raised.RaiseObject>(); //create the hex grid for (int a1 = -gridSize; a1 <= gridSize; a1++) { for (int a2 = -gridSize; a2 <= gridSize; a2++) { //skip tiles that are ouside the hexagon grid if (Mathf.Abs(a1) + Mathf.Abs(a2) > gridSize && Mathf.Sign(a1) != Mathf.Sign(a2)) { continue; } //create object and add object to the raised list GameObject newObject = InstantiateOnHex(a1, a2); grid.Add(new Vector2(a1, a2), raised.AddObject(newObject.GetComponent <MeshRenderer>())); } } }
public void OnFailure(Java.Lang.Exception e) { Raised?.Invoke(this, new FirebaseEventArgs() { exception = e }); }
public string GetCss() { var sb = new StringBuilder(); sb.Append(Raised.StringIf("raised").Spaciate()); sb.Append(Disabled.StringIf("disabled").Spaciate()); sb.Append((Emphasis != SegmentEmphasis.Primary).StringIf(Emphasis.ToString().ToLower().Spaciate())); return(sb.ToString()); }
public async Task <T> RaiseAsync <T>(T context) where T : IInteraction { var resetEvent = new ManualResetEventSlim(); var task = Task.Run(() => { resetEvent.Wait(); return(context); }); Raised?.Invoke(this, new InteractionRequestEventArgs(context, () => resetEvent.Set())); return(await task); }
public virtual void Raise <TViewModel>(string viewName, ViewModelInfo context, Action <TViewModel> onAvailable) where TViewModel : class { Raised?.Invoke(this, new ViewInteractionRequestEventArgs( viewName, context, view => { if (onAvailable != null) { var viewModel = ViewModelContainerHelper.GetViewModelAs <TViewModel>(view); onAvailable.Invoke(viewModel); } }) ); }
public override void Handle(HandleContext context) { var packet = context.Packet; var session = context.Session; var response = packet as IResponse; if (response != null) { Console.WriteLine("调用回复"); Invoked?.Invoke(response); } var e = packet as EventInfo; if (e != null) { Console.WriteLine("事件"); Raised?.Invoke(e); } }
protected virtual void OnRaised(WindowRequestEventArgs e) { Raised?.Invoke(this, e); }
public void Raise(string viewName, ViewModelInfo context) { Raised?.Invoke(this, new ViewInteractionRequestEventArgs(viewName, context, null)); }
private void BoxedEventRaisedHandler(TBoxed value) { Raised?.Invoke(value); }
protected virtual void OnRaised() { Raised?.Invoke(); }
public void Raise() { Raised?.Invoke(); }
private void Raise(Event item) { Raised?.Invoke(item); }
public void Raise(Message message, Action <Message> callback) { Raised?.Invoke(this, new MessageEventArgs(message, callback)); }
void FireRaisedEvent() { Raised?.Invoke(this, EventArgs.Empty); this.tcs !.SetResult(true); }
public static void Raise(T eventData) { Raised?.Invoke(eventData); }
protected virtual void OnRaised(ContextRequestEventArgs e) => Raised?.Invoke(this, e);
/// <summary>Fires the Raised event.</summary> /// <param name="context">The context for the interaction request.</param> public void Raise(IUserInteraction context) { Raised?.Invoke(this, new UserInteractionRequestedEventArgs(context)); }