Ejemplo n.º 1
0
        public static IEnumerable <object> PostMail(IISMailQueue mail)
        {
            IEnumerable <IISMailQueue> item = new[] { mail };

            return(WebOperations
                   .WebPost(item, WebOperations.WebMethod.POST_MAIL_TO_QUEUE, _authToken));
        }
Ejemplo n.º 2
0
        public static ServiceTimer GetScheduler(short serviceId, string apiKey)
        {
            Client       referenceClient = GetClient(apiKey);
            ServiceTimer scheduler       = WebOperations.WebGet <ServiceTimer>(WebOperations.WebMethod.GET_SCHEDULER_BY_CLIENTID_AND_SERVICEID, apiKey, referenceClient.Id, serviceId);

            return(scheduler ?? FileOperations.GetLocalScheduler(serviceId) as ServiceTimer);
        }
Ejemplo n.º 3
0
        public static Client GetClient(string apiKey)
        {
            string machineName = Environment.MachineName;
            Client client      = WebOperations.WebGet <Client>(WebOperations.WebMethod.GET_CLIENT_BY_MACHINE_NAME, apiKey, machineName);

            NewClient(apiKey);
            return(client);
        }
Ejemplo n.º 4
0
        private static void NewClient(string apiKey)
        {
            string machineName = Environment.MachineName;
            Client client      = new Client
            {
                AgentInstallDate = DateTime.Now,
                IsOnline         = true,
                LastDataReceived = DateTime.Now,
                LastOnlineDate   = DateTime.Now,
                Name             = machineName
            };

            _ = WebOperations.WebPost(client, WebOperations.WebMethod.POST_CLIENT, apiKey);
        }
Ejemplo n.º 5
0
        private static bool NewClient(string apiKey)
        {
            string machineName = Environment.MachineName;
            Client client      = new Client
            {
                AgentInstallDate = DateTime.Now,
                IsOnline         = true,
                LastDataReceived = DateTime.Now,
                LastOnlineDate   = DateTime.Now,
                Name             = machineName
            };
            dynamic result = WebOperations.WebPost(client, WebOperations.WebMethod.POST_CLIENT, apiKey);

            if (result > 0)
            {
                return(true);
            }

            return(false);
        }
Ejemplo n.º 6
0
 public static SiteLog GetSiteLog(long siteId)
 {
     return(WebOperations
            .WebGet <SiteLog>(WebOperations.WebMethod.GET_EVENT_LOG_BY_SITEID,
                              _authToken, siteId));
 }
Ejemplo n.º 7
0
 public static SiteWebConfiguration GetConfiguration(long siteId)
 {
     return(WebOperations
            .WebGet <SiteWebConfiguration>(WebOperations.WebMethod.GET_WEB_CONFIGURATION_BY_SITEID,
                                           _authToken, siteId));
 }
Ejemplo n.º 8
0
 public static IEnumerable <SitePackage> PostSitePackage(IEnumerable <SitePackage> item)
 {
     return(WebOperations
            .WebPost(item, WebOperations.WebMethod.POST_PACKAGE_MULTIPLE, _authToken));
 }
Ejemplo n.º 9
0
 public static SiteEndpoint GetSiteEndpoint(long siteId)
 {
     return(WebOperations
            .WebGet <SiteEndpoint>(WebOperations.WebMethod.GET_ENDPOINT_BY_SITEID,
                                   _authToken, siteId));
 }
Ejemplo n.º 10
0
 public static ISiteLogPosition GetLogPosition(long siteId)
 {
     return(WebOperations
            .WebGet <ISiteLogPosition>(WebOperations.WebMethod.GET_SITE_LOG_POSITON,
                                       _authToken, siteId));
 }
Ejemplo n.º 11
0
        public static ServiceTimer GetScheduler(short serviceId, int clientId, string apiKey)
        {
            ServiceTimer scheduler = WebOperations.WebGet <ServiceTimer>(WebOperations.WebMethod.GET_SCHEDULER_BY_CLIENTID_AND_SERVICEID, apiKey, clientId, serviceId);

            return(scheduler ?? FileOperations.GetLocalScheduler(serviceId) as ServiceTimer); // (scheduler'i return et null mu??) Local Scheduler'i return et
        }
Ejemplo n.º 12
0
 public static IEnumerable <SiteWebConfiguration> PostSiteWebConfiguration(IEnumerable <SiteWebConfiguration> item)
 {
     return(WebOperations
            .WebPost(item, WebOperations.WebMethod.POST_WEB_CONFIGURATION_MULTIPLE, _authToken));
 }
Ejemplo n.º 13
0
 public static IEnumerable <Site> GetSites(string machineName)
 {
     return(WebOperations
            .WebGet <IEnumerable <Site> >(WebOperations.WebMethod.GET_SITES_BY_MACHINENAME,
                                          _authToken, machineName));
 }
Ejemplo n.º 14
0
 public static IEnumerable <SiteLog> PostSiteLog(IEnumerable <SiteLog> item)
 {
     return(WebOperations
            .WebPost(item, WebOperations.WebMethod.POST_TRANSACTION_MULTIPLE, _authToken));
 }
Ejemplo n.º 15
0
 public static SiteWebConfiguration PostSiteWebConfiguration(SiteWebConfiguration item)
 {
     return(WebOperations
            .WebPost(item, WebOperations.WebMethod.POST_WEB_CONFIGURATION, _authToken));
 }
Ejemplo n.º 16
0
 public static SiteLog PostSiteLog(SiteLog item)
 {
     return(WebOperations
            .WebPost(item, WebOperations.WebMethod.POST_TRANSACTION, _authToken));
 }
Ejemplo n.º 17
0
 public static IEnumerable <ISiteTracker> PostSiteTracker(IEnumerable <ISiteTracker> item)
 {
     return(WebOperations
            .WebPost(item, WebOperations.WebMethod.POST_SITE_TRACKER_MULTIPLE, _authToken));
 }
Ejemplo n.º 18
0
 public static ISiteTracker PostSiteTracker(ISiteTracker item)
 {
     return(WebOperations
            .WebPost(item, WebOperations.WebMethod.POST_SITE_TRACKER, _authToken));
 }
Ejemplo n.º 19
0
 public static IEnumerable <SiteEndpoint> GetSiteEndpoints(long siteId)
 {
     return(WebOperations
            .WebGet <IEnumerable <SiteEndpoint> >(WebOperations.WebMethod.GET_ENDPOINTS_BY_SITEID,
                                                  _authToken, siteId));
 }
Ejemplo n.º 20
0
 public static SitePackage PostSitePackage(SitePackage item)
 {
     return(WebOperations
            .WebPost(item, WebOperations.WebMethod.POST_PACKAGE, _authToken));
 }
Ejemplo n.º 21
0
 public static IEnumerable <SiteLogFilter> GetSiteTransactionFilters()
 {
     return(WebOperations
            .WebGet <IEnumerable <SiteLogFilter> >(WebOperations.WebMethod.GET_TRANSACTION_FILTERS,
                                                   _authToken));
 }
Ejemplo n.º 22
0
 public static IEnumerable <SiteEventLog> PostSiteEventLog(IEnumerable <SiteEventLog> item)
 {
     return(WebOperations
            .WebPost(item, WebOperations.WebMethod.POST_EVENT_LOG_MULTIPLE, _authToken));
 }
Ejemplo n.º 23
0
 public static bool GetSiteLogActivationStatus()
 {
     return(WebOperations
            .WebGet <bool>(WebOperations.WebMethod.GET_TRANSACTION_ACTIVATION_STATUS,
                           _authToken));
 }
Ejemplo n.º 24
0
 public static IEnumerable <SiteEndpoint> PostSiteEndpoint(IEnumerable <SiteEndpoint> item)
 {
     return(WebOperations
            .WebPost(item, WebOperations.WebMethod.POST_ENDPOINT_MULTIPLE, _authToken));
 }
Ejemplo n.º 25
0
 public static SiteEventLog PostSiteEventLog(SiteEventLog item)
 {
     return(WebOperations
            .WebPost(item, WebOperations.WebMethod.POST_EVENT_LOG, _authToken));
 }
Ejemplo n.º 26
0
 public static IEnumerable <SiteConnectionString> GetSiteConnectionStrings(long siteId)
 {
     return(WebOperations
            .WebGet <IEnumerable <SiteConnectionString> >(WebOperations.WebMethod.GET_CONNECTION_STRINGS_BY_SITEID,
                                                          _authToken, siteId));
 }
Ejemplo n.º 27
0
 public static SiteBinding GetSiteBinding(long siteId)
 {
     return(WebOperations
            .WebGet <SiteBinding>(WebOperations.WebMethod.GET_BINDING_BY_SITEID,
                                  _authToken, siteId));
 }
Ejemplo n.º 28
0
 public static Site GetSite(long siteId)
 {
     return(WebOperations
            .WebGet <Site>(WebOperations.WebMethod.GET_SITE_BY_ID,
                           _authToken, siteId));
 }
Ejemplo n.º 29
0
 public static SiteConnectionString GetConnectionString(long siteId)
 {
     return(WebOperations
            .WebGet <SiteConnectionString>(WebOperations.WebMethod.GET_CONNECTION_STRING_BY_SITEID,
                                           _authToken, siteId));
 }
Ejemplo n.º 30
0
 public static SiteEndpoint PostSiteEndpoint(SiteEndpoint item)
 {
     return(WebOperations
            .WebPost(item, WebOperations.WebMethod.POST_ENDPOINT, _authToken));
 }