AppContext

AppContext is like Application in ASP.NET (MVC). You can see the value all over the application

AppContext.SetSwitch("OCR",true);

And we can have the result in all dll’s by

 public bool IsOCREnabled()
        {
            bool test;
            if (!AppContext.TryGetSwitch("OCR",out test))
                return false;

            return test;
        }

Video demo at https://youtu.be/GMgn4o3yPqw


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *