2using System.Collections.Generic;
3using System.Diagnostics;
20 foreach (T item
in collectionItems)
26 Debug.WriteLine(
"Processed " + processed +
" " + typeof(T).Name +
" objects.\n");
31 string[] companyNames = {
"Brilliantly Limited",
"Ephesian Assurance",
"Jana's Limited",
"Jurua Corp.",
"Sargasso's Corp.",
"Uighur's Insurance",
"Colloquiums Co.",
"Ballparks Limited",
"Bullfrog's Corp.",
"Convocation's Re",
"Apalachicola's Insurance",
"Letterman Shield",
"Bellboy's Assurance",
"Barr's Limited",
"Condescend Co.",
"Bulldog Corp.",
"Chalky Holdings",
"Cardinals Insurance",
"Chimera's Holdings",
"Justin Insurance",
"Oneal Assurance",
"Nicholson Co.",
"Apt Holdings",
"Lean's Assurance",
"Patrica Co.",
"CD's Assurance",
"Buckner's Assurance",
"Rastafarian Insurance",
"Conscripts Insurance",
"Shanna's Corp.",
"Wylie's Assured",
"Sopwith's Shield",
"Wisconsinite's Co.",
"Laverne's Limited",
"Hoover's Shield",
"Noble's Re",
"Cajole Shield",
"Bigness Co.",
"Conviction Limited",
"Algiers Corp.",
"Adelaide Insurance",
"Boston's Re",
"Rojas Re",
"Purana Holdings",
"Account's Re",
"Anemometer Corp.",
"Club Insurance",
"Miro Re",
"Melanie's Re",
"Clarissa's Re",
"Carvings Corp.",
"Hugo Insurance",
"Siberian Shield",
"Coinage Insurance",
"Chitchat's Assurance",
"Xenophon Insurance",
"Annie's Corp.",
"Biodegradable Holdings",
"Construe Co.",
"Debora Assurance",
"Damon Shield",
"Alyce Assured",
"Atalanta Limited",
"Corrugates Insurance",
"Krystal Shield",
"Goff's Assured",
"Bloodsuckers Limited",
"McClure Corp.",
"Miltonic Assured",
"Hummer's Shield",
"Convoke Insurance",
"Acids Holdings",
"Muzak Assurance",
"Catharsis Assured",
"Schulz's Insurance",
"Squibb's Corp.",
"Horus's Assured",
"Cezanne Holdings",
"Moog Limited",
"Classmates Re",
"Portia's Re",
"Arabesque's Shield",
"Billboard Co.",
"Archly Assured",
"Cappuccinos Assurance",
"Fredericton Corp.",
"Contreras Limited",
"Rottweiler's Assured",
"Dubai Assured",
"Blurted Holdings",
"Methodism Insurance",
"Mazzini Limited",
"Casements Shield",
"Apostate's Insurance",
"Chained Assured",
"Knopf's Assurance",
"Businessmen Assured",
"Constables Assured",
"Susquehanna Insurance" };
35 Random rand =
new Random(item.
id.GetHashCode());
37 Debug.WriteLine(item.
id +
" - Description: " + item.
description );
41 double newShare = (double)((rand.Next(12) + 1)) / 10.0;
42 newShare = newShare == 1.1 ? 0.25 : newShare == 1.2 ? 0.75 : newShare;
43 Debug.WriteLine(
new String(
' ', item.
id.Length + 3) +
"Share: " + item.participation +
" -> " + newShare);
44 item.participation = newShare;
47 double newPrem = ((double)rand.Next(20)) * 5000 * (rand.Next(1) == 1 ? 10 : (rand.Next(1) == 1 ? 100 : 1));
48 Debug.WriteLine(
new String(
' ', item.
id.Length + 3) +
"Premium: " + item.premium +
" -> " + newPrem);
52 DateTime newIncept =
new DateTime(DateTime.UtcNow.Year, rand.Next(12) + 1, 1);
53 Debug.WriteLine(
new String(
' ', item.
id.Length + 3) +
"Inception: " + item.
inception_date +
" -> " + newIncept);
54 item.inception_date = newIncept;
55 item.expiry_date = newIncept.AddYears(1);
60 Random rand =
new Random(item.
id.GetHashCode());
64 Debug.WriteLine(item.
id +
" - Description: " + item.
description );
A collection of scripts that are sometimes used to batch seed or modify data on a test server.
static void GenerateAdditionalDataOnServer()
static void ModifyAll< T >(Action< T > Modifier)
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 a single loss set with an associated event loss table.
Representation of a monetary value with a currency.
string description
A user-friendly description of the resource.
Interface for Base class used by all resources.
string id
The resource's unique identifier. It will be used in the request URL when requesting the resource fro...
Abstract representation of a layer with terms.
DateTime? inception_date
The date and time when the contract takes effect.