示例#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.");
     }
 }
 public GraphManagerFixture()
 {
     authProvider = new AuthProvider(AuthProvider.Authority.Organizations);
     graphManager = new GraphManager(authProvider);
     var _ = authProvider.GetAccessTokenWithUsernamePassword().Result;
 }