Region |
Get region by identifier with specified properties.
Namespace: Gamanet.C4.SDK
Assembly: Gamanet.C4.SimpleClient (in Gamanet.C4.SimpleClient.dll) Version: 2026.0.0.733
Syntax
C#
public SimpleRegionV1 Get( Guid regionId, Properties properties )
Parameters
- regionId Guid
- The region identifier.
- properties Properties
- The properties.
Return Value
SimpleRegionV1SimpleRegion or null when does not exists
Implements
ISimpleClientRegionRepositoryV1.Get(Guid, Properties)Example
The following example illustrates how the SimpleClient provides the region by Id with all properties.
The following example illustrates how the SimpleClient provides the region by Id with basic properties.
The following example illustrates how the SimpleClient provides the region by Id with none properties.
C#
using System; using Gamanet.C4.SDK; using Gamanet.C4.SimpleInterfaces; public class Example { static void Main() { // Create instance of simple client var client = new SimpleClient(ConnectorConfiguration.HttpClient); ConnectionInfoV1 token; // Connect to local server var connectionResult = client.Connect(new Uri("https://localhost/"), "Support", "support", out token); if (connectionResult != ConnectionResult.Successful) { Console.WriteLine("Connection unsuccessful, result: {0}", connectionResult); return; } Console.WriteLine("Connection result: {0}", connectionResult); Console.WriteLine(); // Create Example Region var exampleRegion = new SimpleRegionV1( Guid.NewGuid(), "ExampleRegion", EntityRoot.Region, RegionCategory.Region ); // Create Example Region in database client.Regions.Create(exampleRegion); // Get the exampleRegion var result = client.Regions.Get(exampleRegion.Id, Properties.All); Console.WriteLine(result.Name); // Disconnect from server client.Disconnect(); } }
C#
using System; using Gamanet.C4.SDK; using Gamanet.C4.SimpleInterfaces; public class Example { static void Main() { // Create instance of simple client var client = new SimpleClient(ConnectorConfiguration.HttpClient); ConnectionInfoV1 token; // Connect to local server var connectionResult = client.Connect(new Uri("https://localhost/"), "Support", "support", out token); if (connectionResult != ConnectionResult.Successful) { Console.WriteLine("Connection unsuccessful, result: {0}", connectionResult); return; } Console.WriteLine("Connection result: {0}", connectionResult); Console.WriteLine(); // Create Example Region var exampleRegion = new SimpleRegionV1( Guid.NewGuid(), "ExampleRegion", EntityRoot.Region, RegionCategory.Region ); // Create Example Region in database client.Regions.Create(exampleRegion); // Get the exampleRegion var result = client.Regions.Get(exampleRegion.Id, Properties.Basic); Console.WriteLine(result.Name); // Disconnect from server client.Disconnect(); } }
C#
using System; using Gamanet.C4.SDK; using Gamanet.C4.SimpleInterfaces; public class Example { static void Main() { // Create instance of simple client var client = new SimpleClient(ConnectorConfiguration.HttpClient); ConnectionInfoV1 token; // Connect to local server var connectionResult = client.Connect(new Uri("https://localhost/"), "Support", "support", out token); if (connectionResult != ConnectionResult.Successful) { Console.WriteLine("Connection unsuccessful, result: {0}", connectionResult); return; } Console.WriteLine("Connection result: {0}", connectionResult); Console.WriteLine(); // Create Example Region var exampleRegion = new SimpleRegionV1( Guid.NewGuid(), "ExampleRegion", EntityRoot.Region, RegionCategory.Region ); // Create Example Region in database client.Regions.Create(exampleRegion); // Get the exampleRegion var result = client.Regions.Get(exampleRegion.Id, Properties.None); Console.WriteLine(result.Name); // Disconnect from server client.Disconnect(); } }
See Also