Change redirect address in Google Drive - C # (part 2)

I don't know why, but this post was deleted by the moderator in my first question and the moderator wrote that I needed to open a new question. So ...... (part 1 - Change google default redirect - C # (Google liblary) )

I have a bad problem, if I try this code:

public class MyNewAuthorizationCodeMvcApp : AuthorizationCodeMvcApp
    {
        public MyNewAuthorizationCodeMvcApp(Controller controller, FlowMetadata flowData) : base(flowData.Flow, "http://www.yandex.ru",  controller.Request.Url.ToString())
        {         


        }
    } 

      

I am getting error: AuthorizationCodeMvcApp constructor (liblary by default) does not contain a constructor that takes 3 arguments

if i try:

  public class MyNewAuthorizationCodeMvcApp : AuthorizationCodeWebApp
    {
        public MyNewAuthorizationCodeMvcApp(Controller controller, FlowMetadata flowData) : base(flowData.Flow, "http://www.yandex.ru",  controller.Request.Url.ToString())
        {         


        }
    }

      

I am not getting the error BUT! i cant SET Valeu for

        this.controller = controller;
        this.flowData = flowData;

      

Because this is a read-only field (((

What's wrong?

0


source to share


1 answer


AuthorizationCodeMvcApp Takes two parameters in its constructor, which is why you get the first error.

You cannot set controller and streaming data as they are read only, in AuthorizationCodeMvcApp they are only set in the constructor!



I think the best solution for you is to just copy the content of the AuthorizationCodeMvcApp and change line 46 to the URI you want it should be.

0


source







All Articles