Click or drag to resize

NetQuarry.Services Namespace

The services namespace provides runtime services, such as email processing, alert management, and task-scheduling.

Services are defined in metadata and can contain properties for configuration. A Service references a component and that component must implement the IServiceInfo interface.

Services can be marked as Singleton. This means that the application context object will create only one instance of the service for the life of the application.

Public classAC_AddContactRequest
ActiveCampaign add contact request
Public classAC_AddContactResponse
ActiveCampaign add contact response
Public classAC_BaseRequest
ActiveCampaign base request class
Public classAC_BaseResponse
Base response class
Public classAC_Contact
ActiveCampaign contact class
Public classAC_EditContactRequest
ActiveCampaign edit contact request
Public classAC_EditContactResponse
ActiveCampaign edit contact response
Public classAC_GetListRequest
Get list request from ActiveCampaign
Public classAC_GetListResponse
List response from ActiveCampaign
Public classAC_List
ActiveCampaign list class
Public classAC_RemoveContactRequest
ActiveCampaign edit contact request
Public classAC_RemoveContactResponse
ActiveCampaign remove contact response
Public classActiveCampaignListener
Generic handler for ActiveCampaign's API. for more ActiveCampaigns documentation on Event Webhooks.
Public classAlert
A user alert object for alerts managed in the xot_alerts table.
Public classAlertService
The standard platform alert service. Currently alerts are provided via AJAX while users are logged into the application.
Public classAlertSettings
Configuration settings regarding alert/page-message delivery. These specifically apply to page-message as created through DisplayMessage(String, String, AlertDelivery, Int32, AlertAttrs) or one of its overloads.
Public classAlgoliaLocation
Specifies a geo location.
Public classAlgoliaQuery
Holds query parameters for a query against an index.
Public classBlazeAddProductRequest
The Blaze request to add a product.
Public classBlazeAddress
The Blaze address object.
Public classBlazeAdjustmentInfo
The Blaze adjustment information object.
Public classBlazeAsset
The Blaze asset object.
Public classBlazeBaseData
The Blaze base data object.
Public classBlazeBaseGetResponse
Base response of GET operation
Public classBlazeBaseGetResponseWDateRange
Base response with dates of GET operation
Public classBlazeBaseRequest
Blaze service base request
Public classBlazeBaseResponse
Blaze service base response
Public classBlazeBatchAddDetail
The Blaze batch add detail object.
Public classBlazeBatchDetail
The Blaze batch detail object.
Public classBlazeBatchQuantityMap
The Blaze batch quantity object.
Public classBlazeBrand
The Blaze brand object.
Public classBlazeBundleItem
The Blaze bundle item object.
Public classBlazeCart
The Blaze shopping cart object.
Public classBlazeCartItem
The Blaze shopping cart item.
Public classBlazeCartMinimum
The Blaze shopping cart mimimum object.
Public classBlazeCartMinimumDetail
The Blaze shopping cart mimumum detail object.
Public classBlazeCategory
The Blaze category object.
Public classBlazeCompany
The Blaze company object.
Public classBlazeCompanyLicense
The Blaze company license object.
Public classBlazeContact
The Blaze contact object.
Public classBlazeCultivationTaxResult
The Blaze cultivation tax result object.
Public classBlazeEmployee
The Blaze employee object.
Public classBlazeEmployeeOnFleetInfo
The Blaze OnFleet information object.
Public classBlazeGetBrandsResponse
The Blaze request to get available brands.
Public classBlazeGetCategoriesResponse
The Blaze request to get the available categories.
Public classBlazeGetEmployeesResponse
The Blaze get employee response object.
Public classBlazeGetInventoriesResponse
The Blaze request to get the available inventories.
Public classBlazeGetInvoicesResponse
The Blaze request to get the available invoices.
Public classBlazeGetModifiedProductsResponse
The response to a request to get modified products.
Public classBlazeGetProductsResponse
The Blaze get product response object.
Public classBlazeGetPurchaseOrdersResponse
The Blaze get purchase orders response object.
Public classBlazeGetVendorsResponse
The Blaze get vendors response object.
Public classBlazeInventory
The Blaze inventory object.
Public classBlazeInvoice
The Blaze invoice object.
Public classBlazeInvoiceActrivityLog
The Blaze invoice activity log object.
Public classBlazeInvoiceHistory
The Blaze invoice history.
Public classBlazeInvoiceRequest
The Blaze request to get an invoice.
Public classBlazeLocation
The Blaze location object.
Public classBlazeMedicalCondition
The Blaze medical condition.
Public classBlazeMember
The Blaze member object.
Public classBlazeMetrcMap
The Blaze map object.
Public classBlazeNote
The Blaze note object.
Public classBlazeOnlineStoreInfo
The Blaze online store information object.
Public classBlazePoActivityLog
The Blaze PO activity log object.
Public classBlazePoProductAdd
The Blaze PO product add object.
Public classBlazePoProductRequest
The Blaze PO product request.
Public classBlazePoProductRequestResult
The Blaze PO product request result object.
Public classBlazePotencyAmount
The Blaze potency amount object.
Public classBlazePriceBreak
The Blaze price break object.
Public classBlazePriceRange
The Blaze price range object.
Public classBlazeProduct
The Blaze product object.
Public classBlazeProductMap
The Blaze map object.
Public classBlazeProductMetrcInfo
The Blaze product merchant information object.
Public classBlazePromotionReq
The Blaze promotion request object.
Public classBlazePurchaseOrder
The Blaze purchase order object.
Public classBlazePurchaseOrderRequest
The Blaze purchase order request object.
Public classBlazeQuantity
The Blaze quantity object.
Public classBlazeQuantityLog
The Blaze quantity object.
Public classBlazeReceiverInformation
The Blaze receiver information object.
Public classBlazeRole
The Blaze role object.
Public classBlazeSession
The Blaze session object.
Public classBlazeShipperCompany
The Blaze shipper company object.
Public classBlazeShipperInformation
The Blaze shipper information object.
Public classBlazeShippingManifest
The Blaze shipping manifest object.
Public classBlazeTax
The Blaze tax object.
Public classBlazeTaxInfo
The Blaze tax information object.
Public classBlazeTaxResult
The Blaze tax result object.
Public classBlazeTaxTable
The Blaze tax table object.
Public classBlazeTimeCard
The Blaze timecard object.
Public classBlazeTookanInfo
The Blaze Tookan information object.
Public classBlazeTrackingPackage
The Blaze tracking package object.
Public classBlazeVendor
The Blaze vendor object.
Public classBlazeWeightTolerance
The Blaze weight tolerance object.
Public classCallInfo
An Call instance resource represents a single Twilio Call.
Public classCarrierInfo
Carrier information obtained from Twilio. See
Public classDataExportCommandInfo
A class specifiying the various elements that make up a MapperCommand for an IDataExportService
Public classDebounceEmailValidator
Implementation of the validator
Public classDocStorageFileInfo
Return value from the document storage service SaveFile
Public classEmailBounceReader
Scheduled task that polls the SendGrid API for bounces, spamreports, ...
Public classEmailManager
Service implementation of the IEmailManager
Public classEmailValidateResult
Results from a validated email address
Public classEmailValidatorBase
Base class for validators
Public classEpochMillisecondConverter
Json converter for epoch datetime fields. Cannot use Newtonsoft's UnixDateTimeConverter since it converts seconds. Blaze accpets datetime as epoch milliseconds.
Public classEventType
Holds information about the event type
Public classFleetLocateAllAssetStatus
Asset Status response
Public classFleetLocateAssetStatus
Asset status data
Public classFleetLocateBaseResponse
Fleet locate service base response
Public classHttpRequestExtensions
Extension methods for HttpRequest objects.
Public classInvalidPhoneNumberException
Thrown when a phone number lookup returns 404 (invalid phone number).
Public classMailEventArgs
Event args used with mail events, e.g. MailBeforeSend and MailAfterSend.
Public classMailgunEmailValidator
Implementation of the validator
Public classMailgunListener
Mailgun webhook handler
Public classMailService
The MailService object is a wrapper object around System.Web.Mail that can load it's configuration properties from the repository database or used stand alone.
Public classMailUtils
Various utility methods for working with email.
Public classMessageInfo
A Message resource that represents a single message for use with GetMessage(String)
Public classNumberCapabilities
The posible capabilities of a twilio phone number to receive various types of communications. A particular phone number may have any combination of these capabilities.
Public classPhoneNumberInfo
Phone number information obtained from Twilio. See
Public classSendGridEvent
An event to be processed by OnProcessRequest(HttpContext). Correponds, generally, to the xot_email_event table. for more SendGrid documentation on Event Webhooks.
Public classSendGridListener
Generic handler for SendGrid's notification API. for more SendGrid documentation on Event Webhooks.
Public classSendGridListenerParseCharsetRequest
The SendGrid "Character Set and Header Decoding" information for its Inbound Parse Webhook,
Public classSendGridListenerParseEnvelope
The SendGrid envelope for its Inbound Parse Webhook,
Public classServiceBase
Simple implementation of a service
Public classServiceInfos
Holds a collection of IServiceInfo object describing available services.
Public classSystemMailExtensions
Email message extensions
Public classTookanAddAgentData
Add agent response data
Public classTookanAddAgentResponse
Add agent response
Public classTookanAddTeamData
Add team data
Public classTookanAddTeamResponse
Add team response
Public classTookanAgentRequest
Add agent request
Public classTookanBaseRequest
Tookan service base request
Public classTookanBaseResponse
Tookan service base response
Public classTookanCancelTaskRequest
Cancel task request
Public classTookanCreateTaskData
Data part of create task response
Public classTookanCreateTaskReponse
Response data for create task.
Public classTookanCreateTaskRequest
Data class to create task
Public classTookanCustomField
Custom field IMPORTANT : Read the documentation for custom fields at
Public classTookanFleetData
Fleet data
Public classTookanFleetsData
The Tookan fleets object.
Public classTookanGenericResponse
Generic response from Tookan with empty data.
Public classTookanGeoFenceData
Geofence data
Public classTookanGetAgentLocationResponse
Agent location response
Public classTookanGetAgentTagsResponse
Agent tags response
Public classTookanGetAllAgentsData
Get all agents response data
Public classTookanGetAllAgentsRequest
Add agent request
Public classTookanGetAllAgentsResponse
All agents response
Public classTookanGetTaskDetailRequest
The Tookan task detail request object.
Public classTookanGetTaskDetailRequestByOrder
The Tookan task detail request by order object.
Public classTookanGetTaskDetailResponse
The TookanTaskDetail response.
Public classTookanJobAndAgentDetailData
The Tookan job and agent detail object.
Public classTookanJobAndAgentDetailRequest
Job and agent detail request
Public classTookanJobAndAgentDetailsResponse
Job and agent details response
Public classTookanJobData
The Tookan job object.
Public classTookanListener
Generic handler for Tookan's notification API.
Public classTookanLocationData
Location data
Public classTookanPartnerJobsData
The Tookan partner jobs object.
Public classTookanRecurringTasksData
The Tookan recurring tasks object.
Public classTookanRouteData
The Tookan route object.
Public classTookanTask
The Tookan task object.
Public classTookanTaskDetail
The detailed information about a task.
Public classTookanTaskField
The Tookand task field object.
Public classTookanTaskHistory
The Tookan task history object.
Public classTookanTeamData
Team Data
Public classTookanTeamDetailData
Detail data about a particular team.
Public classTookanTeamDetailResponse
Team detail response
Public classTookanTeamFleetSummaryData
Summary information about fleets.
Public classTookanTeamRequest
Team request
Public classTookanUnroutedData
The Tookan unrouted data object.
Public classTookanViewAllTasksRequest
Request to view all tasks
Public classTookanViewAllTasksResponse
Response to view all tasks
Public classTookanWebhookData
Tookan Webhook data. IMPORTANT : - There are inconsistencies in date fields "completed_datetime": "2019-06-06 14:52:44", "job_pickup_datetime": "06/06/2019 01:00 pm", "job_date": "2019-06-06T00:00:00.000Z", "job_date_utc": "2019-06-06T00:00:00.000Z", - There are inconsistencies in phone fields. Maybe it's because numbers are entered like this. "job_pickup_phone": "+1 408-478-5791", "fleet_phone": "+14084785791", - Some datetime fields has "invalid date" string in them. I think they didn't check null values. For pickup tasks, delivery datetime field has "invalid date" in them. "job_pickup_datetime": "06/06/2019 01:00 pm", "job_delivery_datetime": "Invalid date", - Some date fields contain empty string "started_datetime": "2019-06-06 16:56:19", "completed_datetime": "", Opposite also same for delivery tasks. "job_pickup_datetime": "Invalid date", "job_delivery_datetime": "06/06/2019 05:45 pm", - Latitude and longitude fields have different precisions and they are strings. "job_pickup_latitude": "33.87154", "job_pickup_longitude": "-117.92466100000001", "fleet_latitude": "33.8715254", "fleet_longitude": "-117.9244901", - If task is not started, "days_started" field contains "-" instead of empty string or 0. "days_started": "-", "days_started": "0", - "distance_in" field contains the distance unit. But, "total_distance" field also contains a unit. "total_distance_traveled" field's type is integer, while "total_distance" field's type is string. "distance_in": "KM", "total_distance": "0.00 Km", "total_distance_travelled": 0,
Public classTwilioListener
Listener for Twilio requests.
Public classTwilioNumber
A twilio phone number. See the REST API: INCOMING PHONE NUMBERS twilio documentation page.
Public classTwilioPhoneNumber
Describes a Twilio phone number used for voice or SMS.
Public classUniqueArgs
Custom platform parameters provided in the original email as SendGrid "Unique Arguments" via unique_args. When a SendGrid event is received it will include the "Unique Arguments" provided in the original email.
Public classUserSettingsRequiredException
Exception thrown when required user email settings have not been configured.
Public classZeroBounceEmailValidator
Implementation of the validator
Public interfaceIActiveCampaign
Interface implemented by the ActiveCampaign service.
Public interfaceIAlertService
Interface implemented by services providing alerts to users.
Public interfaceIAlgolia
Interface implemented by the Algolia service for remote index / search.
Public interfaceIAuthService
The authorization service.
Public interfaceIBlaze
Interface implemented by the Blaze service.
Public interfaceIDataExportService
An interface used by the DataExport set of processes to export a Mapper's set of data to a specific Data format. The format specified is determined by the Service itself.
Public interfaceIDocStorageService
The interface for services that implement document storage. Note that objects implementing this interface should also implement the IServiceInfo interface required of all platform services.

At this time there are two document storage implementations based on this interface:

  • DBDocStorageViaMapper - Documents are stored in a database using an IMapper configured on the service.
  • S3DocumentStorage - Documents are ultimately stored in Amazon Simple Storage Service (Amazon S3) with local database caching.

Public interfaceIDynamsoftScan
The interface for the Dynamsoft Dynamic Web TWAIN scanner service. The service supports use of the Dynamsoft Dynamic Web TWAIN ActiveX/Plugin component.
Public interfaceIEmailManager
Generic way to control the email manager
Public interfaceCode exampleIEmailService
Interface that implements an email service.
Public interfaceIEmailValidate
Public interfaceIFleetLocate
Interface implemented by the Fleet Locate service.
Public interfaceIJwtService
Generate a JSON Web Token (JWT) single-sign-on token. As described by the IETF ( A JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties. The claims in a JWT are encoded as a JSON object that is used as the payload of a JSON Web Signature(JWS) structure or as the plaintext of a JSON Web Encryption(JWE) structure, enabling the claims to be digitally signed or integrity protected with a Message Authentication Code (MAC) and/or encrypted.
Public interfaceIMessage
Implemented by Message services
Public interfaceIPushNotification
The interface through which one can interact with the Push Notification sending service
Public interfaceIServiceInfo
Interface implemented by core services.
Public interfaceIShortUrl
Interface through which one requests short urls from a service (e.g. the bitly service which uses
Public interfaceITookan
Interface implemented by the Tookan service.
Public interfaceITwilioAuthentication
A small interface for a service to generate tokens for Twilio's javascript libraries
Public interfaceITwilioNumbers
The interface used to maintain twilio phone numbers. The interface is implemented by the TwilioSMS service.
Public interfaceITwilioVoice
Manages the voice interface with Twilio.
Public enumerationAlertAttrs
Attributes for use with alerts and page messages (created via DisplayMessage(Alert) or one of its overloads). See Alert.
Public enumerationAlertDelivery
The available delivery method for alerts (page-messages) as created through DisplayMessage(String, String, AlertDelivery, Int32, AlertAttrs) or one of its overloads.
Public enumerationBlazeActivityType
The Blaze activity types.
Public enumerationBlazeAppTarget
The Blaze application target.
Public enumerationBlazeAssetType
The type of Blaze asset.
Public enumerationBlazeCannabisType
The type of cannabis product.
Public enumerationBlazeCartItemStatus
The statuses for Blaze carts.
Public enumerationBlazeCartMinType
The Blaze card minimum types.
Public enumerationBlazeCheckoutType
The Blaze checkout types.
Public enumerationBlazeColorTheme
The Blaze UI color scheme.
Public enumerationBlazeCompanyType
The Blaze company type.
Public enumerationBlazeConsumerType
The Blaze consumer type.
Public enumerationBlazeDiscountType
The Blaze discount types.
Public enumerationBlazeEnableInventoryType
The Blaze inventory enable types.
Public enumerationBlazeExciseTaxType
The Blaze excise tax types.
Public enumerationBlazeFlowerSourceType
The Blaze flower source types.
Public enumerationBlazeFlowerType
The Blaze flower types.
Public enumerationBlazeInvoicePaymentStatus
The Blaze invoice payment status.
Public enumerationBlazeInvoiceStatus
The Blaze invoice statuses.
Public enumerationBlazeInvoiceTerm
The Blaze invoice terms.
Public enumerationBlazeMinimumsType
The Blaze minimums types.
Public enumerationBlazePaymentOption
The Blaze payment options.
Public enumerationBlazePaymentTerm
The Blaze payment terms.
Public enumerationBlazePaymentType
The Blaze payment types.
Public enumerationBlazePoPaymentOption
The Blaze PO payment options.
Public enumerationBlazePoType
The Blaze PO type.
Public enumerationBlazeProductSaleType
The Blaze product sale types.
Public enumerationBlazeProductType
The Blaze product types.
Public enumerationBlazePurchaseOrderStatus
The Blaze purchase order statuses.
Public enumerationBlazeReceiveBatchStatus
The Blaze receive batch statuses.
Public enumerationBlazeRefundOption
The Blaze refund options.
Public enumerationBlazeRefundType
The Blaze refund types.
Public enumerationBlazeRequestStatus
The Blaze request statuses.
Public enumerationBlazeRoundOffType
The Blaze round-off types.
Public enumerationBlazeShippingManifestStatus
The Blaze shipping manifest statuses.
Public enumerationBlazeShopType
The Blaze shop types.
Public enumerationBlazeStorageLocation
The Blaze storage locations.
Public enumerationBlazeTaxOrder
The Blze tax order.
Public enumerationBlazeTaxType
The Blaze tax type.
Public enumerationBlazeTookanStatus
The Blaze Tookan status.
Public enumerationBlazeTrackTraceSystem
The Blaze track/trace system.
Public enumerationBlazeTransactionType
The Blaze transaction type.
Public enumerationBlazeVendorType
The Blaze vendor types.
Public enumerationBlazeViewType
The Blaze view types.
Public enumerationBlazeWeightKey
The Blaze weight keys.
Public enumerationDataExportMode
Options affecting how to determine whether a Data export is executed online, or offline.
Public enumerationDocStorageOptions
Public enumerationEmailManagerAttributes
Email manager behavior attributes
Public enumerationEmailManagerType
The type of email manager service
Public enumerationEmailSendAttrs
Controls email send behavior.
Public enumerationEmailSendStatus
The type of email manager service
Public enumerationEmailValidateBehavior
Attributes that control the behavior of validate
Public enumerationEmailValidateResultCode
TEXT CODE DESCRIPTION SAFE TO SEND? Syntax 1 Not an email. No Spam Trap 2 Spam-trap by ESPs. No Disposable 3 A temporary, disposable address. No Accept-All 4 A domain-wide setting. Maybe, Not recommended unless on private server Deliverable 5 Verified as real address. Yes Invalid 6 Verified as invalid (Bounce). No Unknown 7 The server cannot be reached. No Role 8 Role accounts such as info, support... Maybe, Not recommended
Public enumerationMailerAttrs
Attributes describing aspects of an email message.
Public enumerationPhoneServiceAttrs
Attributes affecting the behaviour of phone services. This affects implementing the IMessage and ITwilioVoice interfaces, specically the TwilioSMS" service.
Public enumerationS3DocTagOptions
Options for use with the S3 version of IDocStorageService
Public enumerationSendEmailFlags
Public enumerationServiceAttrs
Service attributes
Public enumerationSmtpAuthenticationType
Specifies the authentication mechanism to use when authentication is required to send messages to an SMTP service using a TCP/IP network socket.
Public enumerationTookanAttributes
Tookan service behavior attributes
Public enumerationTookanBatteryUsage
Battery usage
Public enumerationTookanJobType
Job Type
Public enumerationTookanLayoutType
Layout type
Public enumerationTookanReturnCode
When something is wrong with a request, the API will respond with a non-200 status code in the response. To help you better understand the problem, where possible, the API overloads a number of different error codes so your application logic has as much visibility as possible into what has gone wrong.
Public enumerationTookanTaskStatus
Task statuses IMPORTANT : There is no status text for "5". It's skipped or removed I guess.
Public enumerationTookanTransportType
Transportation Type
Public enumerationTwilioTokenType
The different types of token's we can generate for Twilio's javascript libraries to allow them to make REST calls with our account.
The following example shows how to obtain a reference to the email service and send a message using a template.
private void Send(IAppContext appContext, string sendToList, string templateName, NameValueCollection nameValues)
    ServiceInfos        svs = appContext.Services;
    IEmailService        mail = (IEmailService)svs.GetServiceInstance("SmtpMail");            
    NetQuarry.Template    tmpl = appContext.Templates[templateName];
    string                body;
    string                subject;

    if (tmpl == null)
        throw new ApplicationException(string.Format(this.TextItems.GetText(IDS_MISSING_TEMPLATE), templateName));

    body = tmpl.Replace(nameValues);
    subject = tmpl.TextItems.GetText("Subject");

        //--- leave the From field empty, it will default to the value configured in the studio
        mail.Send(string.Empty, sendToList, subject, body, true);
    catch(Exception ex)
        //--- log the error then re-throw
        DevLog.LogMessage("XIssue.Send", "sendMailError", ex);
See Also