public void InitializeRecord(CookieContainer cookies) { var client = new RecordsManagerClient(this.RecordsManagerUrl, cookies); ThreadPool.QueueUserWorkItem(state => { Application.Current.Dispatcher.Invoke(new Action(() => { try { this.Record = client.GetRecordByUri(this.RecordUri); this.IsLoggedIn = true; } catch (WebException ex) { if (((HttpWebResponse)ex.Response).StatusCode == HttpStatusCode.Unauthorized) { this.IsLoggedIn = false; } else { this.Error = ex; } } catch (Exception ex) { this.Error = ex; } })); }); }
private void DemoClientButton_Click(object sender, RoutedEventArgs e) { CookieContainer cookieContainer = this.Signin(); RecordsManagerClient client = new RecordsManagerClient(this.RMUrl.Text, cookieContainer); MessageBox.Show(client.GetRecordsLastEdit().ToString()); }
static void Main(string[] args) { Console.WriteLine("Please enter the URL for your Information Lifecycle server..."); string url = Console.ReadLine(); //Create a new client using default network credentials IRecordsManagerClient client = new RecordsManagerClient(url); //Currently for a production scenario, you would need to get the retention trigger by ID //This sample finds the first manual, event-based, retention trigger and uses that instead. RetentionTrigger retentionTrigger = RetentionTriggerIntegrations.GetFirstManualEventTrigger(client); //Create an event occurrence for the specified trigger using the specified property name & value EventOccurrence eventOccurrence = EventOccurrenceIntegration.CreatePropertyEventOccurrence(client, retentionTrigger.Id, "LoanNumber", "12345"); }
private bool Validate() { if (!string.IsNullOrEmpty(this.RecordsManagerUrl)) { RecordsManagerClient client = new RecordsManagerClient(this.RecordsManagerUrl); if (client.GetSystemInfo() != null) { return(true); } else { this.Message.Text = LocalStrings.ValidationUrl; } } else { this.Message.Text = LocalStrings.ValidationUrl; } return(false); }