Пример #1
0
        public UserInfo[] SearchUsers(string firstName = "", string lastName = "")
        {
            var telemetry = new RequestTelemetry();
            // Note: A single instance of telemetry client is sufficient to track multiple telemetry items.
            var ai = new TelemetryClient();

            // At start of processing this request:
            // Operation Id and Name are attached to all telemetry and help you identify
            // telemetry associated with one request:
            telemetry.Context.Operation.Id   = Guid.NewGuid().ToString();
            telemetry.Context.Operation.Name = "searchUsers Request";

            var stopwatch = System.Diagnostics.Stopwatch.StartNew();

            // ... process the request ...
            IJSSEService jsseService = new JSSEService();
            var          result      = jsseService.SearchUsers(firstName, lastName).ToArray();

            stopwatch.Stop();
            ai.TrackRequest("requestName", DateTime.UtcNow, stopwatch.Elapsed, "200", true);
            // Response code, success
            return(result);
        }
Пример #2
0
        public UserInfo[] SearchOrgUsers(string firstName = "", string lastName = "", int org_id = 0)
        {
            IJSSEService jsseService = new JSSEService();

            return(jsseService.SearchOrgUsers(firstName, lastName, org_id).ToArray());
        }