private static async Task LoadPlacements(So3ApiConnector connector, Guid layoutPageGuid) { if (_symbolReference4 != null) { Console.WriteLine(); Console.WriteLine("Load symbol reference 4 infos via placement guid (en-US)"); var placements = await connector.GetPlacements( layoutPageGuid, "en-US", selectorPlacementGuid : _symbolReference4.Guid ); DumpPlacements(placements); Console.WriteLine(); Console.WriteLine("Load symbol reference 4 infos via placement guid (de-DE)"); placements = await connector.GetPlacements( layoutPageGuid, "de-DE", selectorPlacementGuid : _symbolReference4.Guid ); DumpPlacements(placements); } if (_symbolReference5 != null) { Console.WriteLine(); Console.WriteLine("Load symbol reference 5 infos via placement guid"); var placements = await connector.GetPlacements( layoutPageGuid, "en-US", selectorPlacementGuid : _symbolReference5.Guid ); DumpPlacements(placements); } Console.WriteLine(); Console.WriteLine("Load symbol reference 2 infos via identification"); var placements2 = await connector.GetPlacements( layoutPageGuid, "en-US", selectorIdentificationPrefix : EnvironmentInfo.Identification ); DumpPlacements(placements2); Console.WriteLine(); Console.WriteLine("Load symbol reference via type path"); var placements3 = await connector.GetPlacements( layoutPageGuid, "en-US", selectorTypePath : EnvironmentInfo.SymbolPath ); DumpPlacements(placements3); }
private static async Task CreateMacroReference(So3ApiConnector connector, Guid layoutPageGuid) { Console.WriteLine(); Console.WriteLine("Create macro reference:"); var placements = await connector.CreatePlacement( layoutPageGuid, EnvironmentInfo.MacroPath, 100, 300, (float)Math.PI / 2, "==XXX"); placements.ForEach(DumpPlacement); Console.WriteLine(); Console.WriteLine("Load macro placements via identification:"); var loadedPlacement4 = await connector.GetPlacements( layoutPageGuid, "en-US", selectorIdentificationPrefix : "==XXX" ); foreach (var placement in loadedPlacement4) { DumpPlacement(placement); } }
private static async Task UpdateMarkedForDeletion(So3ApiConnector connector, Guid layoutPageGuid) { Console.WriteLine(); Console.WriteLine("Update symbol reference 2 MarkedForDeletion to true"); await connector.UpdateMarkedForDeletion( layoutPageGuid, new PlacementsSelector(_symbolReference2.Guid), true ); Console.WriteLine(); Console.WriteLine("Load symbol reference 2 infos via identification"); var loadedPlacement2 = await connector.GetPlacements( layoutPageGuid, "en-US", _symbolReference2.Guid ); foreach (var placement in loadedPlacement2) { DumpPlacement(placement); } }
private static async Task LoadPlacements(So3ApiConnector connector, Guid layoutPageGuid) { Console.WriteLine(); Console.WriteLine("Load symbol reference 4 infos via placement guid (en-US)"); var loadedPlacement4 = await connector.GetPlacements( layoutPageGuid, "en-US", selectorPlacementGuid : _symbolReference4.Guid ); foreach (var placement in loadedPlacement4) { DumpPlacement(placement); } Console.WriteLine(); Console.WriteLine("Load symbol reference 4 infos via placement guid (de-DE)"); loadedPlacement4 = await connector.GetPlacements( layoutPageGuid, "de-DE", selectorPlacementGuid : _symbolReference4.Guid ); foreach (var placement in loadedPlacement4) { DumpPlacement(placement); } Console.WriteLine(); Console.WriteLine("Load symbol reference 5 infos via placement guid"); var loadedPlacement5 = await connector.GetPlacements( layoutPageGuid, "en-US", selectorPlacementGuid : _symbolReference5.Guid ); foreach (var placement in loadedPlacement5) { DumpPlacement(placement); } Console.WriteLine(); Console.WriteLine("Load symbol reference 2 infos via identification"); var loadedPlacement2 = await connector.GetPlacements( layoutPageGuid, "en-US", selectorIdentificationPrefix : EnvironmentInfo.Identification ); foreach (var placement in loadedPlacement2) { DumpPlacement(placement); } Console.WriteLine(); Console.WriteLine("Load symbol reference via type path"); var loadedPlacement3 = await connector.GetPlacements( layoutPageGuid, "en-US", selectorTypePath : EnvironmentInfo.SymbolPath ); foreach (var placement in loadedPlacement3) { DumpPlacement(placement); } }