コード例 #1
0
 public GraphManagerTests(GraphManagerTestFixture fixture)
 {
     appConfig    = fixture.appConfig;
     authProvider = fixture.authProvider;
     graphManager = fixture.graphManager;
     Debug.WriteLine(graphManager.GetHashCode());
 }
コード例 #2
0
 public GraphManagerTestFixture()
 {
     appConfig = new ConfigurationBuilder()
                 .AddUserSecrets <GraphManagerTests>()
                 .Build();
     AuthProvider.Initialize(appConfig);
     GraphManager.Initialize(AuthProvider.Instance);
     authProvider = AuthProvider.Instance;
     graphManager = GraphManager.Instance;
 }
コード例 #3
0
 // lazy singleton
 public static void Initialize(IAuthenticationProvider authProvider)
 {
     if (instance == null)
     {
         instance = new GraphManager(authProvider);
     }
     else
     {
         Console.WriteLine($"{typeof(GraphManager)} has already been initialized.");
     }
 }
コード例 #4
0
 public GraphManagerFixture()
 {
     authProvider = new AuthProvider(AuthProvider.Authority.Organizations);
     graphManager = new GraphManager(authProvider);
     var _ = authProvider.GetAccessTokenWithUsernamePassword().Result;
 }