/// <summary> /// Get entity from incidents by key /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='incidentid'> /// key: incidentid of incident /// </param> /// <param name='select'> /// Select properties to be returned /// </param> /// <param name='expand'> /// Expand related entities /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <MicrosoftDynamicsCRMincident> GetByKeyAsync(this IIncidents operations, string incidentid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetByKeyWithHttpMessagesAsync(incidentid, select, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Add new entity to incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// New entity /// </param> /// <param name='prefer'> /// Required in order for the service to return a JSON representation of the /// object. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <MicrosoftDynamicsCRMincident> CreateAsync(this IIncidents operations, MicrosoftDynamicsCRMincident body, string prefer = "return=representation", CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateWithHttpMessagesAsync(body, prefer, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get entities from incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='top'> /// </param> /// <param name='filter'> /// </param> /// <param name='count'> /// </param> /// <param name='orderby'> /// Order items by property values /// </param> /// <param name='select'> /// Select properties to be returned /// </param> /// <param name='expand'> /// Expand related entities /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <MicrosoftDynamicsCRMincidentCollection> GetAsync(this IIncidents operations, int?top = default(int?), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(top, filter, count, orderby, select, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get entities from incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='top'> /// </param> /// <param name='skip'> /// </param> /// <param name='search'> /// </param> /// <param name='filter'> /// </param> /// <param name='count'> /// </param> /// <param name='orderby'> /// Order items by property values /// </param> /// <param name='select'> /// Select properties to be returned /// </param> /// <param name='expand'> /// Expand related entities /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IncidentsGetResponseModel> GetAsync(this IIncidents operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(top, skip, search, filter, count, orderby, select, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public IncidentsRSSReader(IRSSReaderFactory rssReaderFactory, ICFADataSet dataSet, IRSSIncidentItemFactory rssIncidentItemFactory, IIncidents incidents) { this.rssReaderFactory = rssReaderFactory; this.dataSet = dataSet; this.rssIncidentItemFactory = rssIncidentItemFactory; this.incidents = incidents; }
public void Setup() { client = new Mock <IProxy>(); request = new Mock <BaseRequest>(new Mock <IProxy>().Object); request.CallBase = true; // Create proxy instance incidentsProxy = new AxosoftAPI.NET.Incidents(client.Object); incidentsProxy = new AxosoftAPI.NET.Incidents(request.Object); }
public void Update(IIncidents incidents) { string guid = incidentRSSNode.SelectSingleNode("guid").InnerText; string description = incidentRSSNode.SelectSingleNode("description").InnerText; Regex regex = new Regex( @".*Region:\</strong\> (?<region>..).*Location:\</strong\> (?<location>[^,\<]*),?(?<name>[^\<]*).*Date/Time:\</strong\> (?<timeStamp>[^\<]+).*Type\:\</strong\> (?<type>[^\<]*).*Status:</strong> (?<status>[^\<]*).*Size:</strong> (?<size>[^\<]*).*Vehicles:</strong> (?<appliances>[^\<]*).*"); Match match = regex.Match(description); int region = GetInteger(match.Groups["region"].Value); string location = match.Groups["location"].Value.Trim(); DateTime time = DateTime.Parse(match.Groups["timeStamp"].Value); string name = match.Groups["name"].Value.Trim(); string incidentType = match.Groups["type"].Value; string status = match.Groups["status"].Value; string size = match.Groups["size"].Value; short appliances = GetInteger(match.Groups["appliances"].Value); incidents.OnIncidentRead(guid, region, location, time, name, incidentType, status, size, appliances); }
/// <summary> /// Add new entity to incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// New entity /// </param> /// <param name='prefer'> /// Required in order for the service to return a JSON representation of the /// object. /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse <MicrosoftDynamicsCRMincident> CreateWithHttpMessages(this IIncidents operations, MicrosoftDynamicsCRMincident body, string prefer = "return=representation", Dictionary <string, List <string> > customHeaders = null) { return(operations.CreateWithHttpMessagesAsync(body, prefer, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <summary> /// Get entities from incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='top'> /// </param> /// <param name='skip'> /// </param> /// <param name='search'> /// </param> /// <param name='filter'> /// </param> /// <param name='count'> /// </param> /// <param name='orderby'> /// Order items by property values /// </param> /// <param name='select'> /// Select properties to be returned /// </param> /// <param name='expand'> /// Expand related entities /// </param> public static IncidentsGetResponseModel Get(this IIncidents operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>)) { return(operations.GetAsync(top, skip, search, filter, count, orderby, select, expand).GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse CloseIncidentWithHttpMessages(this IIncidents operations, MicrosoftDynamicsCRMCloseIncidentParameters body, Dictionary <string, List <string> > customHeaders = null) { return(operations.CloseIncidentWithHttpMessagesAsync(body, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <summary> /// Add reference to adoxio_workers /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='incidentId'> /// key: adoxio_workerid /// </param> /// <param name='fieldname'> /// key: fieldname /// </param> /// <param name='odataid'> /// reference value /// </param> public static void AddReference(this IIncidents operations, string incidentId, string fieldname, OdataId odataid = default(OdataId)) { operations.AddReferenceAsync(incidentId, fieldname, odataid).GetAwaiter().GetResult(); }
/// <summary> /// Delete entity from incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='incidentid'> /// key: incidentid of incident /// </param> /// <param name='ifMatch'> /// ETag /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IIncidents operations, string incidentid, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(incidentid, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Update entity in incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='incidentid'> /// key: incidentid of incident /// </param> /// <param name='body'> /// New property values /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdateAsync(this IIncidents operations, string incidentid, MicrosoftDynamicsCRMincident body, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.UpdateWithHttpMessagesAsync(incidentid, body, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Remove reference to adoxio_workers /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='incidentId'> /// key: adoxio_workerid /// </param> /// <param name='fieldname'> /// key: fieldname /// </param> /// <param name='odataid'> /// reference value /// </param> public static void RemoveReference(this IIncidents operations, string incidentId, string fieldname, string removeId) { operations.RemoveReferenceAsync(incidentId, fieldname, removeId).GetAwaiter().GetResult(); }
/// <summary> /// Add reference to adoxio_workers /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='incidentId'> /// key: incidentId /// </param> /// <param name='fieldname'> /// key: fieldname /// </param> /// <param name='odataid'> /// reference value /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task AddReferenceAsync(this IIncidents operations, string incidentId, string fieldname, OdataId odataid = default(OdataId), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.AddReferenceWithHttpMessagesAsync(incidentId, fieldname, odataid, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Get entities from incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='top'> /// </param> /// <param name='skip'> /// </param> /// <param name='search'> /// </param> /// <param name='filter'> /// </param> /// <param name='count'> /// </param> /// <param name='orderby'> /// Order items by property values /// </param> /// <param name='select'> /// Select properties to be returned /// </param> /// <param name='expand'> /// Expand related entities /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse <IncidentsGetResponseModel> GetWithHttpMessages(this IIncidents operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), Dictionary <string, List <string> > customHeaders = null) { return(operations.GetWithHttpMessagesAsync(top, skip, search, filter, count, orderby, select, expand, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <summary> /// Remove reference to adoxio_workers /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='incidentId'> /// key: incidentId /// </param> /// <param name='fieldname'> /// key: fieldname /// </param> /// <param name='odataid'> /// reference value /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task RemoveReferenceAsync(this IIncidents operations, string incidentId, string fieldname, string removeId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.RemoveReferenceWithHttpMessagesAsync(incidentId, fieldname, removeId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Get entity from incidents by key /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='incidentid'> /// key: incidentid of incident /// </param> /// <param name='select'> /// Select properties to be returned /// </param> /// <param name='expand'> /// Expand related entities /// </param> public static MicrosoftDynamicsCRMincident GetByKey(this IIncidents operations, string incidentid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>)) { return(operations.GetByKeyAsync(incidentid, select, expand).GetAwaiter().GetResult()); }
/// <summary> /// Get entity from incidents by key /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='incidentid'> /// key: incidentid /// </param> /// <param name='select'> /// Select properties to be returned /// </param> /// <param name='expand'> /// Expand related entities /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse <MicrosoftDynamicsCRMincident> GetByKeyWithHttpMessages(this IIncidents operations, string incidentid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), Dictionary <string, List <string> > customHeaders = null) { return(operations.GetByKeyWithHttpMessagesAsync(incidentid, select, expand, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <summary> /// Update entity in incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='incidentid'> /// key: incidentid of incident /// </param> /// <param name='body'> /// New property values /// </param> public static void Update(this IIncidents operations, string incidentid, MicrosoftDynamicsCRMincident body) { operations.UpdateAsync(incidentid, body).GetAwaiter().GetResult(); }
/// <summary> /// Delete entity from incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='incidentid'> /// key: incidentid /// </param> /// <param name='ifMatch'> /// ETag /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse DeleteWithHttpMessages(this IIncidents operations, string incidentid, string ifMatch = default(string), Dictionary <string, List <string> > customHeaders = null) { return(operations.DeleteWithHttpMessagesAsync(incidentid, ifMatch, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <summary> /// Delete entity from incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='incidentid'> /// key: incidentid of incident /// </param> /// <param name='ifMatch'> /// ETag /// </param> public static void Delete(this IIncidents operations, string incidentid, string ifMatch = default(string)) { operations.DeleteAsync(incidentid, ifMatch).GetAwaiter().GetResult(); }
/// <summary> /// Update entity in incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='incidentid'> /// key: incidentid /// </param> /// <param name='body'> /// New property values /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse UpdateWithHttpMessages(this IIncidents operations, string incidentid, MicrosoftDynamicsCRMincident body, Dictionary <string, List <string> > customHeaders = null) { return(operations.UpdateWithHttpMessagesAsync(incidentid, body, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <summary> /// Get entities from incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='top'> /// </param> /// <param name='filter'> /// </param> /// <param name='count'> /// </param> /// <param name='orderby'> /// Order items by property values /// </param> /// <param name='select'> /// Select properties to be returned /// </param> /// <param name='expand'> /// Expand related entities /// </param> public static MicrosoftDynamicsCRMincidentCollection Get(this IIncidents operations, int?top = default(int?), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>)) { return(operations.GetAsync(top, filter, count, orderby, select, expand).GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> public static void CloseIncident(this IIncidents operations, MicrosoftDynamicsCRMCloseIncidentParameters body) { operations.CloseIncidentAsync(body).GetAwaiter().GetResult(); }
/// <summary> /// Add new entity to incidents /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// New entity /// </param> /// <param name='prefer'> /// Required in order for the service to return a JSON representation of the /// object. /// </param> public static MicrosoftDynamicsCRMincident Create(this IIncidents operations, MicrosoftDynamicsCRMincident body, string prefer = "return=representation") { return(operations.CreateAsync(body, prefer).GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task CloseIncidentAsync(this IIncidents operations, MicrosoftDynamicsCRMCloseIncidentParameters body, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.CloseIncidentWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose(); }