C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
Seed.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using AnalyzeRe;
3
5{
6 public static partial class Scripts
7 {
8 public static void SeedServer()
9 {
10 IReference<EventCatalog> eventCatalog = new EventCatalog
11 {
12 description = "Contrived ARE Catalog",
13 tags = new List<string> { "ARE" },
14 source = "Analyze Re Inc."
15 }.Post(Samples.CSV.Event_Catalog_Data).ToReference();
16 }
17
18 public static void WipeServer()
19 {
22 else
23 {
24 foreach (EventCatalog o in API.GetResourceList<EventCatalog>().items)
26 }
27 }
28 }
29}
Exposes the various sample CSV files as strings.
Definition Samples.CSV.cs:9
static string Event_Catalog_Data
Exposes sample resource objects, with built-in methods for injecting dependencies.
Definition Samples.cs:14
Utilities for cleaning up the server.
Definition CleanUp.cs:19
static bool ForceCleanServer(bool ignoreExceptions=false, int? timeout=null)
Invoke the DELETE method on the root of the server. Will wait for the DELETE to complete successfully...
Definition CleanUp.cs:63
static bool TryDelete_Silent(IAPIResource item)
Attempt to delete the resource, but throw no exceptions if it cannot be deleted.
Definition CleanUp.cs:93
Retrieve settings from environment variables if they exist, or the project settings file otherwise.
static bool ROOT_DELETE_SUPPORTED
Indicates whether the server currently supports the DELETE method on the server root to wipe out all ...
API methods / requests made available to the user.
static ICollectionResponse< IAPIResource > GetResourceList(Type resourceType, IEnumerable< Parameter > requestParameters=null, string collectionNameOverride=null, int? timeout=null)
Get a collection of resources from the server.
Representation of an event catalog. The event catalog may cover multiple region/perils,...
Base interface for all reference entities.