public async Task <XConnectClientConfiguration> ConfigureClient() { XConnectClientConfiguration toReturn; var cfgGenerator = new CFGGenerator(); toReturn = cfgGenerator.GetCFG(CinemaVisitorCollectionModel.Model); var initializer = new XConnectInitializer(); if (!initializer.Errors.Any()) { await initializer.InitCFGAsync(toReturn); } else { Errors.AddRange(initializer.Errors); } if (initializer.Errors.Any()) { Errors.AddRange(initializer.Errors); toReturn = null; } return(toReturn); }
public static ControlFlowGraph Create(AMethodDecl method) { ControlFlowGraph graph = new ControlFlowGraph(method); CFGGenerator generator = new CFGGenerator(); method.GetBlock().Apply(generator); graph.Nodes = new List<Node>(generator.Nodes.Count); graph.Nodes.AddRange(generator.Nodes); return graph; }
public static ControlFlowGraph Create(AMethodDecl method) { ControlFlowGraph graph = new ControlFlowGraph(method); CFGGenerator generator = new CFGGenerator(); method.GetBlock().Apply(generator); graph.Nodes = new List <Node>(generator.Nodes.Count); graph.Nodes.AddRange(generator.Nodes); return(graph); }
public async System.Threading.Tasks.Task CreateKnownContact(CandidateMockContactInfo candidateContactInfo) { var cfgGenerator = new CFGGenerator(); var cfg = cfgGenerator.GetCFG(CinemaVisitorCollectionModel.Model); try { await cfg.InitializeAsync(); using (var client = new XConnectClient(cfg)) { await CreateOneContactAsync(client, candidateContactInfo); } } catch (Exception ex) { Console.WriteLine(ex.Message); } }