How to use Action in Dependency Service?

Liêm_NguyễnLiêm_Nguyễn USMember ✭✭✭✭

How to use Action in Dependency Service?

Tagged:

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Can you provide more information about the Action? Is this a Control?

  • Liêm_NguyễnLiêm_Nguyễn USMember ✭✭✭✭
    > @LeonLu said:
    > Can you provide more information about the Action? Is this a Control?

    Thank you for your reply!
    I saw some topic about Dependency Service
    In interface class, they create method then put Action as parameters
    Ex: DoPlatformFunction(Action<string> actionName){}

    And a model class with a property is Action
    Ex: public Action<string> Success {};

    I don't know what Action feature and when we use Action?
  • LeonLuLeonLu Member, Xamarin Team Xamurai
    edited July 17

    Does Action is come from the System.Action? If yes, This Action is a delegation in C#, it can pass parameters, delegates without return values. Actually, Action Success() is a method.

  • Liêm_NguyễnLiêm_Nguyễn USMember ✭✭✭✭
    edited July 17
    > @LeonLu said:
    > Does Action is come from the System.Action? If yes, This Action is a delegation in C#, it can pass parameters, delegates without return values. Actually, Action Success() is a method.

    Great thank!
    How to know a task Success or Failed when Action Success will be call?
Sign In or Register to comment.