示例#1
0
        public MainWindowViewModel()
        {
            //TODO: Dirty, let's fix this sometime soon, and NOT use a static IoC Container for resolving dependencies!
            _officeGraphClient = App.IoC.GetInstance <IOfficeGraphClient>();

            _signInButtonText       = "Sign In";
            _signInButtonColor      = new SolidColorBrush(Colors.DarkGreen);
            _signInButtonFontWeight = FontWeights.Bold;
            _signInButtonForeground = new SolidColorBrush(Colors.White);
        }
示例#2
0
        public static async Task RunExamplesAsync()
        {
            IOfficeGraphClient officeGraphClient = CreateAndInializeOfficeGraphClient();

            if (officeGraphClient == null)
            {
                System.Console.WriteLine("Unable to continue");
                return;
            }

            var me = await officeGraphClient.GetMyInformationAsync();

            System.Console.WriteLine($"Allright, {me.givenName}, let's do this!");
        }