当前位置: 首页>>代码示例>>C#>>正文


C# DataStore类代码示例

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


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

示例1: PagesModule

 public PagesModule(DataStore store)
 {
     _Store = store;
     Get["/"] = Home;
     Get["/Apps"] = Apps;
     Get["/About"] = About;
 }
开发者ID:runesoerensen,项目名称:Apphbify,代码行数:7,代码来源:PagesModule.cs

示例2: DataStorageManager

 protected DataStorageManager(DataStore dataStore)
 {
     this.dataStore = dataStore;
     this.typeMappings = new TypeMappingCollection();
     this.registeredMemberTypeMappings = new RegisteredMemberMappingCollection();
     this.relationshipMappings = new RelationshipMappingCollection();
 }
开发者ID:sffogg,项目名称:inform,代码行数:7,代码来源:DataStorageManager.cs

示例3: MainForm

        public MainForm()
        {
            InitializeComponent();
            data = new DataStore();

            //Set AutoGenerateColumns False
            dataGridView1.AutoGenerateColumns = false;

            //Set Columns Count
            dataGridView1.ColumnCount = 3;

            //Add Columns
            dataGridView1.Columns[0].Name = "Post";
            dataGridView1.Columns[0].HeaderText = "Post";
            dataGridView1.Columns[0].DataPropertyName = "Rentedatum";

            dataGridView1.Columns[1].HeaderText = "Bedrag";
            dataGridView1.Columns[1].Name = "Bedrag";
            dataGridView1.Columns[1].DataPropertyName = "Bedrag";

            dataGridView1.Columns[2].Name = "NaarNaam";
            dataGridView1.Columns[2].HeaderText = "NaarNaam";
            dataGridView1.Columns[2].DataPropertyName = "NaarNaam";

            //this.dataGridView1.DataSource = data.Transactions;
        }
开发者ID:petersnoek,项目名称:financieeloverzicht,代码行数:26,代码来源:MainForm.cs

示例4: ReadRegisters

        internal static ReadHoldingInputRegistersResponse ReadRegisters(ReadHoldingInputRegistersRequest request, DataStore dataStore, ModbusDataCollection<ushort> dataSource)
        {
            RegisterCollection data = DataStore.ReadData<RegisterCollection, ushort>(dataStore, dataSource, request.StartAddress, request.NumberOfPoints, dataStore.SyncRoot);
            ReadHoldingInputRegistersResponse response = new ReadHoldingInputRegistersResponse(request.FunctionCode, request.SlaveAddress, data);

            return response;
        }
开发者ID:uqlpayne,项目名称:UQ-iLab-BatchLabServer-DotNet,代码行数:7,代码来源:ModbusSlave.cs

示例5: GetHistory

        public List<HistoryModel> GetHistory(string symbol, DateTime? startDate, DateTime? endDate)
        {
            using (var db = new DataStore<HistoryModel>("history"))
            {
                if (startDate == null || endDate == null)
                {
                    startDate = DateTime.Now.AddYears(-3);
                    endDate = DateTime.Now;
                }

                var history = db.GetCollection().Where(x => x.Symbol == symbol && x.Date >= startDate.Value && x.Date <= endDate.Value);
                if (!history.Any())
                {
                    var json = _yqlService.FetchHistory(symbol, startDate.Value, endDate.Value);
                    var jobj = JObject.Parse(json);
                    if (Convert.ToInt32(((JValue)(jobj["query"]["count"])).Value) > 0)
                    {
                        history = Helper.DeserializeJson<List<HistoryModel>>(JArray.Parse(jobj["query"]["results"]["quote"].ToString()));
                        history.ToList().ForEach(x => x.Symbol = symbol);
                        SaveHistory(history.ToList());
                    }
                }
                return history.ToList();
            }
        }
开发者ID:nileshgokhalepune,项目名称:finapp,代码行数:25,代码来源:StockManager.cs

示例6: MasterMateria

        public MasterMateria(MateriaType type, DataStore data)
            : base()
        {
            Name = "Master" + type.ToString();
            Type = type;

            switch (type)
            {
                case MateriaType.Magic:
                    Description = "Equips all magical spells";
                    _abilities = data.GetMagicSpells().Select(x => x.Name).ToList();
                    break;
                case MateriaType.Command:
                    Description = "Equips all commands";
                    // TODO : define command abilities
                    _abilities = new List<string> { "Sense", "Steal" };
                    break;
                case MateriaType.Summon:
                    Description = "Equips all summon spells";
                    _abilities = data.GetSummonSpells().Select(x => x.Name).ToList();
                    break;

                case MateriaType.Support:
                case MateriaType.Independent:
                    throw new ImplementationException("No master materia definition for type " + type);
            }

            Tiers = new int[1];
        }
开发者ID:skinitimski,项目名称:Reverence,代码行数:29,代码来源:MasterMateria.cs

示例7: SaveSubSectors

 public void SaveSubSectors(List<SectorModel> list)
 {
     using (var db = new DataStore<SectorModel>("subsectors"))
     {
         db.SaveMany(list);
     }
 }
开发者ID:nileshgokhalepune,项目名称:finapp,代码行数:7,代码来源:SectorManager.cs

示例8: SaveSectors

 public void SaveSectors(List<SectorModel> sectors)
 {
     using (var db = new DataStore<SectorModel>("sectors"))
     {
         db.SaveMany(sectors);
     }
 }
开发者ID:nileshgokhalepune,项目名称:finapp,代码行数:7,代码来源:SectorManager.cs

示例9: CachedList

 internal CachedList(IList list, DataStore dataStore, IMemberMapping childPropertyMapping, object key)
     : base(list)
 {
     this.key = key;
     this.dataStore = dataStore;
     this.childPropertyMapping = childPropertyMapping;
 }
开发者ID:sffogg,项目名称:inform,代码行数:7,代码来源:CachedList.cs

示例10: Customer

 public Customer(string name, Statement statementGenerator)
 {
     Name = name;
     Rentals = new List<Rental>();
     StatementGenerator = statementGenerator;
     CurrentDataStore = new DataStore();
 }
开发者ID:Confirmit,项目名称:Students,代码行数:7,代码来源:Customer.cs

示例11: GetCachedSectors

 public List<SectorModel> GetCachedSectors()
 {
     using (var db = new DataStore<SectorModel>("sectors"))
     {
         return db.GetCollection();
     }
 }
开发者ID:nileshgokhalepune,项目名称:finapp,代码行数:7,代码来源:SectorManager.cs

示例12: ReadDiscretes

        internal static ReadCoilsInputsResponse ReadDiscretes(ReadCoilsInputsRequest request, DataStore dataStore, ModbusDataCollection<bool> dataSource)
        {
            DiscreteCollection data = DataStore.ReadData<DiscreteCollection, bool>(dataStore, dataSource, request.StartAddress, request.NumberOfPoints, dataStore.SyncRoot);
            ReadCoilsInputsResponse response = new ReadCoilsInputsResponse(request.FunctionCode, request.SlaveAddress, data.ByteCount, data);

            return response;
        }
开发者ID:uqlpayne,项目名称:UQ-iLab-BatchLabServer-DotNet,代码行数:7,代码来源:ModbusSlave.cs

示例13: Serialize

 public override void Serialize(string path, DataStore currentData)
 {
     foreach (var item in statements)
     {
         item.Serialize(path,currentData);
     }
 }
开发者ID:Confirmit,项目名称:Students,代码行数:7,代码来源:CompositeStatement.cs

示例14: Process

        public async Task Process()
        {
            var bytes = File.ReadAllBytes(Environment.CurrentDirectory + @"\icon.png");

            var versions = this.Versions();
            var version = versions.Values.First();

            var queued = new ImageQueued
            {
                Identifier = Guid.NewGuid(),
                OriginalExtension = Naming.DefaultExtension,
                
            };
            queued.FileNameFormat = queued.Identifier.ToString() + "_{0}.{1}";

            await this.container.Save(string.Format("{0}_original.jpeg", queued.Identifier), bytes);

            var store = new DataStore(connectionString);

            var processor = new Processor(new DataStore(connectionString), versions);
            await processor.Process(queued);

            var data = await this.container.Get(string.Format("{0}_test.gif", queued.Identifier));
            Assert.IsNotNull(data);

            var entities = await this.table.QueryByRow<ImageEntity>("test");
            var entity = entities.FirstOrDefault();

            Assert.IsNotNull(entity);
            Assert.AreEqual(version.Format.MimeType, entity.MimeType);
            Assert.AreEqual(string.Format(Naming.PathFormat, this.container.Name, entity.FileName), entity.RelativePath);
        }
开发者ID:shoshindes,项目名称:King.Azure.Imaging,代码行数:32,代码来源:ProcessorTests.cs

示例15: It_should_fetch_a_valid_addon

 public void It_should_fetch_a_valid_addon()
 {
     var data = new DataStore();
     var addon = data.GetAddonByKey("sqlserver");
     Assert.NotNull(addon);
     Assert.Equal("sqlserver", addon.Key);
 }
开发者ID:nterry,项目名称:Apphbify,代码行数:7,代码来源:GetAddonByKey.cs


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