Exemple #1
0
 public SiteBinding GetSiteBinding(int id)
 {
     using (SqlConnection conn = DataVault.GetOpenConnection())
     {
         return(conn.Query("SELECT * FROM IISSiteBinding WHERE Id=@id", new { id }).SingleOrDefault());
     }
 }
        public IEnumerable <SiteWebConfiguration> PostSiteWebConfiguration(IEnumerable <SiteWebConfiguration> siteWebConfigurations)
        {
            siteWebConfigurations = siteWebConfigurations.GroupBy(x => x.Id).Select(x => x.FirstOrDefault());

            return(DataVault
                   .Post(DapperMethod.CoreServices.PostSiteWebConfigMultiple, siteWebConfigurations));
        }
Exemple #3
0
 public IEnumerable <SitePackage> PostPackageInformation(IEnumerable <SitePackage> sitePackage)
 {
     sitePackage = sitePackage
                   .GroupBy(x => new { x.SiteId, x.Name })
                   .Select(x => x.FirstOrDefault());
     return(DataVault
            .Post(DapperMethod.CoreServices.PostSitePackVersionMultiple, sitePackage));
 }
Exemple #4
0
        public IEnumerable <SiteEndpoint> PostSiteEndpoint(IEnumerable <SiteEndpoint> siteEndpoint)
        {
            siteEndpoint = siteEndpoint
                           .GroupBy(x => new { x.SiteId, x.EndpointUrl, x.EndpointName })
                           .Select(x => x.FirstOrDefault());

            return(DataVault
                   .Post(DapperMethod.TrackingServices.PostSiteEndpointMultiple, siteEndpoint));
        }
        public BaseRepository(string dbConnectionString)
        {
            vault = new DataVault(dbConnectionString);

            string className = typeof(Class).Name;

            _consoleTitle = $"[DB - ENGINE]({className})-> ";

            XConsole.SetDefaultColorSet(DatabaseEngine.ConsoleColor);
            XConsole.SetTitle(_consoleTitle);
        }
Exemple #6
0
        public string ObtainApiKey(string username, string password, bool generateKey = true)
        {
            if (generateKey)
            {
                GenerateApiKey(username, password);
            }

            DTIISMNGUser user = DataVault
                                .Get <DTIISMNGUser>(DapperMethod.AuthenticationServices.ObtainApiKey,
                                                    new { @Username = username, @Password = password });

            return(user?.AuthKey);
        }
Exemple #7
0
 public IEnumerable <SiteConnectionString> PostSiteConnectionString(IEnumerable <SiteConnectionString> siteConnectionString)
 {
     siteConnectionString = siteConnectionString
                            .GroupBy(x => new { x.SiteId, x.ServerName, x.DatabaseName, x.ConnectionName })
                            .Select(x => x.FirstOrDefault());
     //List<SiteConnectionString> strings = siteConnectionString.ToList();
     //var q = from x in strings
     //        group x by new { x.SiteId, x.ServerName, x.DatabaseName, x.ConnectionName } into g
     //        let count = g.Count()
     //        orderby count descending
     //        select new { Value = g.Key, Count = count };
     return(DataVault
            .Post(DapperMethod.TrackingServices.PostSiteConnectionStringMultiple, siteConnectionString));
 }
Exemple #8
0
        public dynamic SignWithApiKey(string apiKey)
        {
            if (apiKey == null)
            {
                return(null);
            }

            SignedUser user = DataVault
                              .Get <SignedUser>(DapperMethod.AuthenticationServices.SignInWithApiKey,
                                                new { @AuthKey = apiKey });

            if (user == null)
            {
                return(null);
            }

            user.AuthKey = apiKey;

            return(user);
        }
Exemple #9
0
 public IEnumerable <ADDomain> All()
 {
     return(DataVault
            .Get <IEnumerable <ADDomain> >(DapperMethod.PlatformServices.GetActiveDirectoryDomainsAll));
 }
 public IEnumerable <SiteWebConfiguration> All()
 {
     return(DataVault
            .GetList <SiteWebConfiguration>(DapperMethod.CoreServices.GetSiteWebConfigsAll));
 }
 public IEnumerable <ISiteTracker> PostSiteTracker(IEnumerable <ISiteTracker> siteTracker)
 {
     return(DataVault
            .Post(DapperMethod.CoreServices.PostSiteTrackerMultiple, siteTracker));
 }
Exemple #12
0
 public int PostSiteBinding(SiteBinding siteBinding)
 {
     return(DataVault
            .Post(DapperMethod.CoreServices.PostSiteBinding, siteBinding));
 }
Exemple #13
0
 public IEnumerable <SiteEndpoint> GetEndpointList(int SiteId)
 {
     return(DataVault
            .GetList <SiteEndpoint>(DapperMethod.TrackingServices.GetSiteEndpointsBySiteId,
                                    new { @SiteId = SiteId }));
 }
Exemple #14
0
 public int PostSiteEndpoint(SiteEndpoint siteEndpoint)
 {
     return(DataVault
            .Post(DapperMethod.TrackingServices.PostSiteEndpoint, siteEndpoint));
 }
Exemple #15
0
 public IEnumerable <SiteBinding> PostSiteBinding(IEnumerable <SiteBinding> siteBindings)
 {
     return(DataVault
            .Post(DapperMethod.CoreServices.PostSiteBindingMultiple, siteBindings));
 }
Exemple #16
0
 public static extern int RegisterDragDrop(
     IntPtr hWnd, 
     DataVault.UI.Impl.Controls.FileSystem.ShellAPI.Interfaces.IDropTarget IdropTgt);
 public ServiceTimer GetScheduler(int clientId, int serviceId)
 {
     return(DataVault
            .Get <ServiceTimer>(DapperMethod.ManagementServices.GetScheduler,
                                new { @clientId = clientId, @serviceId = serviceId }));
 }
 public int SetScheduler(IServiceTimer svcTimer)
 {
     return(DataVault
            .Post(DapperMethod.ManagementServices.PostScheduler, svcTimer));
 }
 public int SaveClient(IClient client)
 {
     return(DataVault
            .Post(DapperMethod.ManagementServices.PostClient, client));
 }
 public IEnumerable <Client> All()
 {
     return(DataVault
            .GetList <Client>(DapperMethod.ManagementServices.GetAllClients));
 }
 public Client GetClient(string machineName)
 {
     return(DataVault
            .Get <Client>(DapperMethod.ManagementServices.GetClientByMachineName,
                          new { @machineName = machineName }));
 }
 public SiteWebConfiguration GetSiteWebConfiguration(int id)
 {
     return(DataVault
            .Get <SiteWebConfiguration>(DapperMethod.CoreServices.GetSiteWebConfigBySiteId,
                                        new { @Id = id }));
 }
Exemple #23
0
 public IEnumerable <SiteConnectionString> All()
 {
     return(DataVault
            .GetList <SiteConnectionString>(DapperMethod.TrackingServices.GetSiteConnectionStringsAll));
 }
 public int PostSiteWebConfiguration(SiteWebConfiguration siteWebConfiguration)
 {
     return(DataVault
            .Post(DapperMethod.CoreServices.PostSiteWebConfig, siteWebConfiguration));
 }
Exemple #25
0
 public IEnumerable <SiteConnectionString> GetConnectionStringList(int SiteId)
 {
     return(DataVault
            .GetList <SiteConnectionString>(DapperMethod.TrackingServices.GetSiteConnectionStringBySiteId,
                                            new { @SiteId = SiteId }));
 }
Exemple #26
0
 public IEnumerable <SiteEndpoint> All()
 {
     return(DataVault
            .GetList <SiteEndpoint>(DapperMethod.TrackingServices.GetSiteEndpointsAll));
 }
Exemple #27
0
 public SiteConnectionString GetSiteConnectionString(int id)
 {
     return(DataVault
            .Get <SiteConnectionString>(DapperMethod.TrackingServices.GetSiteConnectionStringById,
                                        new { @Id = id }));
 }
Exemple #28
0
 public SiteEndpoint GetSiteEndpoint(int Id)
 {
     return(DataVault
            .Get <SiteEndpoint>(DapperMethod.TrackingServices.GetSiteEndpointById,
                                new { @Id = Id }));
 }
Exemple #29
0
 public int PostSiteConnectionString(SiteConnectionString siteConnectionString)
 {
     return(DataVault
            .Post(DapperMethod.TrackingServices.PostSiteConnectionString, siteConnectionString));
 }
 public int DisableScheduler(int serviceId, int clientId)
 {
     return(DataVault
            .Post(DapperMethod.ManagementServices.DisableScheduler,
                  new { @serviceId = serviceId, @clientId = clientId }));
 }
 public int PostSiteTracker(ISiteTracker siteTracker)
 {
     return(DataVault
            .Post(DapperMethod.CoreServices.PostSiteTracker, siteTracker));
 }