• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IDataConnector类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IDataConnector的典型用法代码示例。如果您正苦于以下问题:C# IDataConnector类的具体用法?C# IDataConnector怎么用?C# IDataConnector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IDataConnector类属于命名空间,在下文中一共展示了IDataConnector类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ClearRestorePoint

 public void ClearRestorePoint(IDataConnector genericData)
 {
     foreach (var s in Schema)
     {
         DeleteTempVersion(genericData, s.Name);
     }
 }
开发者ID:VirtualReality,项目名称:Universe,代码行数:7,代码来源:Migrator.cs


示例2: Validate

        public bool Validate(IDataConnector genericData)
        {
            if (genericData.GetUniverseVersion (MigrationName) != Version)
                return false;

            return DoValidate(genericData);
        }
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:7,代码来源:Migrator.cs


示例3: FinishedMigration

        public override void FinishedMigration(IDataConnector genericData)
        {
            if (!genericData.TableExists("estates")) return;
            DataReaderConnection dr = genericData.QueryData("WHERE `Key` = 'EstateID'", "estates",
                                                            "`ID`, `Key`, `Value`");

            if (dr != null)
            {
                try
                {
                    while (dr.DataReader.Read())
                    {
                        try
                        {
                            UUID ID = UUID.Parse(dr.DataReader["ID"].ToString());
                            string value = dr.DataReader["Value"].ToString();
                            QueryFilter filter = new QueryFilter();
                            filter.andFilters["`ID`"] = value;
                            filter.andFilters["`Key`"] = "EstateSettings";
                            List<string> results = genericData.Query(new string[1] {"`Value`"}, "estates", filter, null,
                                                                     null, null);
                            if ((results != null) && (results.Count >= 1))
                            {
                                EstateSettings es = new EstateSettings();
                                es.FromOSD((OSDMap) OSDParser.DeserializeLLSDXml(results[0]));
                                genericData.Insert("estateregions", new object[] {ID, value});

                                filter = new QueryFilter();
                                filter.andFilters["`EstateID`"] = value;

                                List<string> exist = genericData.Query(new string[1] {"`EstateID`"}, "estatesettings",
                                                                       filter, null, null, null);
                                if (exist == null || exist.Count == 0)
                                {
                                    genericData.Insert("estatesettings",
                                                       new object[]
                                                           {
                                                               value, es.EstateName, es.EstateOwner, es.ParentEstateID,
                                                               es.ToOSD()
                                                           });
                                }
                            }
                        }
                        catch
                        {
                        }
                    }
                }
                catch
                {
                }
                finally
                {
                    dr.DataReader.Close();
                    genericData.CloseDatabase(dr);
                    dr.Dispose ();
                }
            }
        }
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:59,代码来源:EstateMigrator_1.cs


示例4: Validate

 public bool Validate(DataSessionProvider sessionProvider, IDataConnector genericData)
 {
     if (genericData.GetAuroraVersion() != Version)
     {
         return false;
     }
     return DoValidate(sessionProvider, genericData);
 }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:8,代码来源:Migrator.cs


示例5: Validate

 public bool Validate(IDataConnector genericData)
 {
     if (genericData.GetAuroraVersion(MigrationName) != Version)
     {
         return false;
     }
     return DoValidate(genericData);
 }
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:8,代码来源:Migrator.cs


示例6: Load

        public override void Load(IDataConnector conn)
        {
            using (var sb = new SQLiteQueryBuilder(Plugin.SQLSafeName))
            {
                sb.SelectAll(TableDefinition.TableName);

                _data = conn.ExecuteArray<UserPermisison>(sb);
            }

            ProgramLog.Error.Log(this.GetType().Name + ": " + (_data == null ? "NULL" : _data.Length.ToString()));
        }
开发者ID:skylord123,项目名称:Terraria-s-Dedicated-Server-Mod,代码行数:11,代码来源:UserPermissions.cs


示例7: SetConnector

 public static void SetConnector(IDataConnector connector, bool throwWhenSet = true)
 {
     lock (_sync)
     {
         if (_connector != null && throwWhenSet)
         {
             throw new InvalidOperationException(String.Format("Attempted to load '{0}' when a '{1}' was already loaded", connector.ToString(), _connector.ToString()));
         }
         _connector = connector;
     }
 }
开发者ID:claudiofreda,项目名称:Terraria-s-Dedicated-Server-Mod,代码行数:11,代码来源:IDataConnector.cs


示例8: MigrationManager

 public MigrationManager(DataSessionProvider sessionProvider, IDataConnector genericData)
 {
     this.sessionProvider = sessionProvider;
     this.genericData = genericData;
     migrators.Add(new AuroraMigrator_2010_03_13());
     migrators.Add(new AuroraMigrator_2010_11_4());
     migrators.Add(new AuroraMigrator_2010_12_30());
     migrators.Add(new AuroraMigrator_2011_1_15());
     migrators.Add(new AuroraMigrator_2011_1_16());
     migrators.Add(new AuroraMigrator_2011_1_20());
     migrators.Add(new AuroraMigrator_2011_1_28());
     migrators.Add(new AuroraMigrator_2011_2_1());
 }
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:13,代码来源:MigrationManager.cs


示例9: MigrationManager

        public MigrationManager(IDataConnector genericData, string migratorName, bool validateTables)
        {
            this.genericData = genericData;
            this.migratorName = migratorName;
            this.validateTables = validateTables;
            List<IMigrator> allMigrators = UniverseModuleLoader.PickupModules<IMigrator>();

            foreach (
                IMigrator m in allMigrators.Where(m => m.MigrationName != null).Where(m => m.MigrationName == migratorName))
            {
                migrators.Add((Migrator) m);
            }
        }
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:13,代码来源:MigrationManager.cs


示例10: MigrationManager

        public MigrationManager(IDataConnector genericData, string migratorName, bool validateTables)
        {
            this.genericData = genericData;
            this.migratorName = migratorName;
            this.validateTables = validateTables;
            List<IMigrator> allMigrators = Aurora.Framework.AuroraModuleLoader.PickupModules<IMigrator>();
            foreach (IMigrator m in allMigrators)
            {
                if (m.MigrationName == null)
                    continue;
                if (m.MigrationName == migratorName)
                    migrators.Add((Migrator)m);

            }
        }
开发者ID:NickyPerian,项目名称:Aurora-Sim,代码行数:15,代码来源:MigrationManager.cs


示例11: DefaultTaskViewModel

        /// <summary>
        /// Constructor of the class
        /// </summary>
        /// <param name="taskModel"></param>
        /// <param name="targetList"></param>
        /// <param name="dataConnector"></param>
        /// <param name="mainPage"></param>
        /// <param name="state"></param>
        public DefaultTaskViewModel(ITaskModel taskModel, ObservableCollection<ITaskViewModel> targetList, IDataConnector dataConnector, MainPage mainPage, TaskState state)
        {
            TaskModel = taskModel;
            _targetList = targetList;
            _dataConnector = dataConnector;
            ItemVisualWidth = mainPage.ActualWidth;

            // Commands
            Break = new ViewModelCommand()
            {
                Command = new RelayCommand(r => BreakTask()),
                Text = "Break"
            };

            PunchOut = new ViewModelCommand
            {
                Command = new RelayCommand(r => FinishTask()),
                Text = "Finished",
                ImagePath = @"Images/finish.png"
            };

            DeleteFromList = new ViewModelCommand
            {
                Command = new RelayCommand(
                    r =>
                    {
                        if (targetList != null && targetList.Contains(this))
                        {
                            targetList.Remove(this);
                            _dataConnector.DeleteTask(taskModel.Id);
                        }
                    }),
                Text = "Delete",
                ImagePath = "Images/delete.png"
            };

            // Timer Init
            _timer = new DispatcherTimer();
            _timer.Tick += timer_Tick;
            _timer.Interval = TimeSpan.FromSeconds(1);
            _timer.Start();

            // Setstate
            State = state;
            _initLoad = false;
        }
开发者ID:nhammerl,项目名称:TaskTimeRecorder,代码行数:54,代码来源:DefaultTaskViewModel.cs


示例12: MigrationManager

        public MigrationManager(IDataConnector genericData, string migratorName, bool validateTables)
        {
            this.genericData = genericData;
            this.migratorName = migratorName;
            this.validateTables = validateTables;
            List<IMigrator> allMigrators = AuroraModuleLoader.PickupModules<IMigrator>();
#if (!ISWIN)
            foreach (IMigrator m in allMigrators)
            {
                if (m.MigrationName != null)
                {
                    if (m.MigrationName == migratorName)
                    {
                        migrators.Add((Migrator)m);
                    }
                }
            }
#else
            foreach (IMigrator m in allMigrators.Where(m => m.MigrationName != null).Where(m => m.MigrationName == migratorName))
            {
                migrators.Add((Migrator) m);
            }
#endif
        }
开发者ID:Gnu32,项目名称:Silverfin,代码行数:24,代码来源:MigrationManager.cs


示例13: Save

 public override void Save(IDataConnector conn)
 {
     throw new NotImplementedException();
 }
开发者ID:Narkun,项目名称:Terraria-s-Dedicated-Server-Mod,代码行数:4,代码来源:GroupPermissions.cs


示例14: TestThatAllTablesValidate

 protected bool TestThatAllTablesValidate(IDataConnector genericData)
 {
     foreach (var s in schema)
     {
         if (!genericData.VerifyTableExists(s.X1, s.X2))
         {
             return false;
         }
     }
     return true;
 }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:11,代码来源:Migrator.cs


示例15: EnsureAllTablesInSchemaExist

 protected void EnsureAllTablesInSchemaExist(IDataConnector genericData)
 {
     foreach (var s in schema)
     {
         genericData.EnsureTableExists(s.X1, s.X2);
     }
 }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:7,代码来源:Migrator.cs


示例16: DoCreateDefaults

 protected virtual void DoCreateDefaults(DataSessionProvider sessionProvider, IDataConnector genericData)
 {
 }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:3,代码来源:Migrator.cs


示例17: CreateDefaults

 public void CreateDefaults(DataSessionProvider sessionProvider, IDataConnector genericData)
 {
     DoCreateDefaults(sessionProvider, genericData);
     genericData.WriteAuroraVersion(Version);
 }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:5,代码来源:Migrator.cs


示例18: DoMigrate

 protected virtual void DoMigrate(DataSessionProvider sessionProvider, IDataConnector genericData)
 {
 }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:3,代码来源:Migrator.cs


示例19: Migrate

 public void Migrate(DataSessionProvider sessionProvider, IDataConnector genericData)
 {
     DoMigrate(sessionProvider, genericData);
     genericData.WriteAuroraVersion(Version);
 }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:5,代码来源:Migrator.cs


示例20: DoPrepareRestorePoint

        protected virtual void DoPrepareRestorePoint(DataSessionProvider sessionProvider, IDataConnector genericData)
        {

        }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:4,代码来源:Migrator.cs



注:本文中的IDataConnector类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IDataContainer类代码示例发布时间:2022-05-24
下一篇:
C# IDataColumn类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap